<template>
	<view style="padding-bottom: 150rpx;" :style="objColor">
		<customer />

		<view v-if="isLogin" class="switch-nav">
			<!-- #V2G功能 -->
			<text class="t1">当前身份：</text>
			<text v-if="memberInfo.memberType == 1 || memberInfo.memberType == 2"
				class="thidden">{{memberInfo.groupName}}-{{memberInfo.motorcadeName}}</text>
			<text v-else class="thidden">个人身份（{{memberInfo.name}}）</text>
			<view v-if="memberInfo.deductMode === 'TeamAccount' || memberInfo.deductMode === 'LeaguerAccount'"
				class="t2" @click="switchUserType">
				<image src="https://oos-cn.ctyunapi.cn/front-end/static/static/switch2.png" /><text>切换</text>
			</view>
		</view>

		<!-- 桩枪信息 -->
		<navigator open-type="redirect"
			:url="'/homeSub/pages/siteDetail/siteDetail?stationId=' + stationDetail.stationId">
			<view class="siteGun_view">
				<view class="site_img">
					<image
						:src="stationDetail.stationIcon ? stationDetail.stationIcon : 'https://oos-cn.ctyunapi.cn/front-end/static/static/pic.png'" />
				</view>
				<view class="site_des">
					<view class="site_title">
						{{ stationDetail.stationName }}
						<view class="gun_status">
							<text v-if="gunDetail.gunState == 1" class="gun_text">空闲</text>
							<text v-if="gunDetail.gunState == 2" class="gun_text">充电准备</text>
							<text v-if="gunDetail.gunState == 4" class="gun_text">充电完成</text>
							<text v-if="gunDetail.gunState == 3" class="gun_text">充电中</text>
							<text v-if="gunDetail.gunState == 5" class="gun_text">离线</text>
							<text v-if="gunDetail.gunState == 6" class="gun_text">充电锁定</text>
							<text v-if="gunDetail.gunState == 7" class="gun_text">故障</text>
							<text v-if="gunDetail.gunState == 8" class="gun_text">预约</text>
							<text v-if="gunDetail.gunState == 9" class="gun_text">禁用</text>
							<text v-if="gunDetail.gunState == 255" class="gun_text">默认</text>
						</view>
					</view>
					<view class="site_gunId">
						枪口编号：{{ gunDetail.pileno }}-{{ gunDetail.gunno }}
					</view>
					<view class="site_gun_des">
						{{gunDetail.currentMode}}<text
							class="tagDivision" />{{gunDetail.powerMode==1?'慢充':gunDetail.powerMode==2?'快充':'超充'}}<text
							class="tagDivision" />{{ gunDetail.ratedPower }}kw
					</view>
				</view>
			</view>
		</navigator>

		<!-- #双枪 -->
		<template v-if="doubleGunSwitch">
			<view v-if="!gunDetail1.gunid" class="pile_head" style="padding:20rpx" @click="addGun">
				<view class='add-gun'>新增枪 + </view>
			</view>

			<navigator v-else open-type="redirect"
			:url="'/homeSub/pages/siteDetail/siteDetail?stationId=' + stationDetail.stationId">
				<view class="siteGun_view siteGun_view_item">
					<view class="site_img">
						<image
							:src="stationDetail.stationIcon ? stationDetail.stationIcon : 'https://oos-cn.ctyunapi.cn/front-end/static/static/pic.png'" />
					</view>
					<view class="site_des">
						<view class="site_title">
							{{ stationDetail.stationName }}
							<view class="gun_status">
								<text v-if="gunDetail1.gunState == 1" class="gun_text">空闲</text>
								<text v-if="gunDetail1.gunState == 2" class="gun_text">充电准备</text>
								<text v-if="gunDetail1.gunState == 4" class="gun_text">充电完成</text>
								<text v-if="gunDetail1.gunState == 3" class="gun_text">充电中</text>
								<text v-if="gunDetail1.gunState == 5" class="gun_text">离线</text>
								<text v-if="gunDetail1.gunState == 6" class="gun_text">充电锁定</text>
								<text v-if="gunDetail1.gunState == 7" class="gun_text">故障</text>
								<text v-if="gunDetail1.gunState == 8" class="gun_text">预约</text>
								<text v-if="gunDetail1.gunState == 9" class="gun_text">禁用</text>
								<text v-if="gunDetail1.gunState == 255" class="gun_text">默认</text>
							</view>
						</view>
						<view class="site_gunId">
							枪口编号：{{ gunDetail1.pileno }}-{{ gunDetail1.gunno }}
						</view>
						<view class="site_gun_des">
							{{gunDetail1.currentMode}}<text
								class="tagDivision" />{{gunDetail1.powerMode==1?'慢充':gunDetail1.powerMode==2?'快充':'超充'}}<text
								class="tagDivision" />{{ gunDetail1.ratedPower }}kw
						</view>
					</view>
				</view>
			</navigator>
		</template>

		<!-- 费用信息 -->
		<view class="price_view">
			<view class="price_title">
				<view class="price_name">{{ isV2GOption ? '充电费用信息' : '费用信息' }}</view>
				<view class="price_des" :data-gunid="gunDetail.gunid" data-type="open" @tap="pricePopupVisible">
					价格详情
					<image src="https://oos-cn.ctyunapi.cn/front-end/static/cartoon/turn_act.png" />
				</view>
			</view>
			<view class="current_time">
				当前计费时段:
				<text
					v-if="!gunDetail.nowPrice.allDayPriceUnifyFlag">{{gunDetail.nowPrice.currentStartTime || '--'}}-{{gunDetail.nowPrice.currentEndTime || ''}}</text>
				<text v-else>全天价格统一</text>
			</view>
			<!-- <view class="current_price">
				<view  class="price" v-if="gunDetail.nowPrice.discount || gunDetail.nextStagePrice.contractDiscount">
					<image class="active-icon" src="https://oos-cn.ctyunapi.cn/front-end/static/static/car.png"
									mode="heightFix" v-if="gunDetail.nextStagePrice.contractDiscount"></image>
					<image class="active-icon" src="https://oos-cn.ctyunapi.cn/front-end/static/static/gift.png"
									mode="heightFix" v-else></image>
									<text class="price"><text class="sp">￥</text>{{ gunDetail.nowPrice.discount?gunDetail.nowPrice.currentPriceStr:gunDetail.nowPrice.sweepPriceStr }}<text class="sp">起</text></text>
				<text style="color: #909399;text-decoration: line-through;margin-left: 10rpx;font-size: 24rpx;"  v-if="gunDetail.nowPrice.discount">￥{{ gunDetail.nowPrice.sweepPriceStr }}起</text>
				</view>
				<view v-else class="price">
					<text class="price"><text class="sp">￥</text>{{ gunDetail.nowPrice.discount?gunDetail.nowPrice.currentPriceStr:gunDetail.nowPrice.sweepPriceStr }}<text class="sp">起</text></text>
					<text style="color: #909399;text-decoration: line-through;margin-left: 10rpx;font-size: 24rpx;"  v-if="gunDetail.nowPrice.discount">￥{{ gunDetail.nowPrice.sweepPriceStr }}起</text>
				</view>
			</view>
			<view class="current_price_info">
				电费{{ gunDetail.nowPrice.currentPowerPriceStr ? gunDetail.nowPrice.currentPowerPriceStr : '--' }}元/度 | 服务费{{ gunDetail.nowPrice.currentServicePriceStr ? gunDetail.nowPrice.currentServicePriceStr : '--' }}元/度
			</view> -->


			<!-- 831价格展示 -->
			<view class="price_view_box">
				<!-- 先判断 是否有专享价 -->
				<view v-if="gunDetail.nowPrice.exclusiveDiscount" class="total_view yyy">
					<!-- 只有专享价 -->
					<view class="zxj_view zxj">
						<!-- <view class="current_view">
							<text class="v_text_current">
								¥<text class="current_t">{{ gunDetail.nowPrice.sweepPriceStr }}</text>
							</text>
						</view> -->
						<view class="img_view_831_bg">
							<image class="v_icon" mode="scaleToFill"
								src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/bgTag/zxj_bg.png" />
							<view class="v_text">
								<text>
									¥{{ gunDetail.nowPrice.exclusivePriceStr }}
								</text>
							</view>
						</view>
					</view>
				</view>
				<view v-else class="total_view www">
					<view class="zxj_view zdyh">
						<view class="current_view">
							<text class="v_text_current">
								¥<text
									class="current_t">{{ gunDetail.nowPrice.discount ? gunDetail.nowPrice.currentPriceStr : gunDetail.nowPrice.sweepPriceStr }}</text>
							</text>
						</view>
						<!-- 划线价展示：站点优惠 || 成长会员折扣 || 大客户价 -->
						<!-- 23.11.22 付费会员不显示划线价 -->
						<view
							v-if="gunDetail.nowPrice.discount || gunDetail.nowPrice.growthleDiscount || gunDetail.nowPrice.contractDiscount"
							class="hxj_view">
							<text class="v_text">
								¥{{ gunDetail.nowPrice.sweepPriceStr }}
							</text>
						</view>

						<!-- 大客户价展示条件 -->
						<view v-if="gunDetail.nowPrice.contractDiscount" class="img_view_831_bg">
							<image class="v_icon" mode="scaleToFill"
								src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/bgTag/dkh_bg.png" />
							<view class="v_text">
								<text>
									¥{{ gunDetail.nowPrice.contractPriceStr }}
								</text>
							</view>
						</view>
						<!-- 成长会员价展示 -->
						<view v-if="gunDetail.nowPrice.growthleDiscount" class="img_view_831_bg">
							<image class="v_icon" mode="scaleToFill"
								src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/bgTag/icon-huiyuan.png" />
							<view class="v_text">
								<text>
									¥{{ gunDetail.nowPrice.growthlePriceStr }}
								</text>
							</view>
						</view>
						<!-- 付费会员价展示 -->
						<view v-if="gunDetail.nowPrice.payleDiscount" class="img_view_831_bg">
							<image class="v_icon" mode="scaleToFill"
								src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/bgTag/icon-vip.png" />
							<view class="v_text">
								<text>
									¥{{ gunDetail.nowPrice.paylePriceStr }}
								</text>
							</view>
						</view>

					</view>

				</view>
			</view>
			<!-- 电费和服务费 -->
			<view v-if="!gunDetail.nowPrice.exclusiveDiscount" class="branch_view">
				<!-- 站点优惠 -->
				<view v-if="gunDetail.nowPrice.discount" class="branch_item">
					电费{{ gunDetail.nowPrice.currentPowerPriceStr }}元/度 |
					服务费{{ gunDetail.nowPrice.currentServicePriceStr }}元/度
				</view>
				<!-- 专享价和大客户 -->
				<view v-else class="branch_item">
					电费{{ gunDetail.nowPrice.sweepPowerPriceStr }}元/度 |
					服务费{{ gunDetail.nowPrice.sweepServicePriceStr }}元/度
				</view>
			</view>
		</view>

		<!-- #V2G功能 放电费用信息 -->
		<view
			v-if="isV2GOption && gunDetail.dischargeNowPrice && Object.keys(gunDetail.dischargeNowPrice).length && memberInfo.memberType !=2"
			class="price_view">
			<view class="price_title">
				<view class="price_name">放电费用信息</view>
				<view class="price_des" :data-gunid="gunDetail.gunid" data-type="disChargeOpen"
					@tap="pricePopupVisible">
					价格详情
					<image src="https://oos-cn.ctyunapi.cn/front-end/static/cartoon/turn_act.png" />
				</view>
			</view>
			<view class="current_time">
				当前计费时段:
				<text
					v-if="!gunDetail.dischargeNowPrice.allDayPriceUnifyFlag">{{gunDetail.dischargeNowPrice.currentStartTime || '--'}}-{{gunDetail.nowPrice.currentEndTime || ''}}</text>
				<text v-else>全天价格统一</text>
			</view>
			<!-- 831价格展示 -->
			<view class="price_view_box">
				<!-- 先判断 是否有专享价 -->
				<view v-if="gunDetail.dischargeNowPrice.exclusiveDiscount" class="total_view yyy">
					<!-- 只有专享价 -->
					<view class="zxj_view zxj">
						<!-- <view class="current_view">
							<text class="v_text_current">
								¥<text class="current_t">{{ gunDetail.nowPrice.sweepPriceStr }}</text>
							</text>
						</view> -->
						<view class="img_view_831_bg">
							<image class="v_icon" mode="scaleToFill"
								src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/bgTag/zxj_bg.png" />
							<view class="v_text">
								<text>
									¥{{ gunDetail.nowPrice.exclusivePriceStr }}
								</text>
							</view>
						</view>
					</view>
				</view>
				<view v-else class="total_view www">
					<view class="zxj_view zdyh">
						<view class="current_view">
							<text class="v_text_current">
								¥<text
									class="current_t">{{ gunDetail.dischargeNowPrice.discount ? gunDetail.dischargeNowPrice.currentPriceStr : gunDetail.dischargeNowPrice.sweepPriceStr }}</text>
							</text>
						</view>
						<!-- 划线价展示：站点优惠 || 成长会员折扣 || 大客户价 -->
						<!-- 23.11.22 付费会员不显示划线价 -->
						<view
							v-if="gunDetail.dischargeNowPrice.discount || gunDetail.dischargeNowPrice.growthleDiscount || gunDetail.dischargeNowPrice.contractDiscount"
							class="hxj_view">
							<text class="v_text">
								¥{{ gunDetail.dischargeNowPrice.sweepPriceStr }}
							</text>
						</view>

						<!-- 大客户价展示条件 -->
						<view v-if="gunDetail.dischargeNowPrice.contractDiscount" class="img_view_831_bg">
							<image class="v_icon" mode="scaleToFill"
								src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/bgTag/dkh_bg.png" />
							<view class="v_text">
								<text>
									¥{{ gunDetail.dischargeNowPrice.contractPriceStr }}
								</text>
							</view>
						</view>
						<!-- 成长会员价展示 -->
						<view v-if="gunDetail.dischargeNowPrice.growthleDiscount" class="img_view_831_bg">
							<image class="v_icon" mode="scaleToFill"
								src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/bgTag/icon-huiyuan.png" />
							<view class="v_text">
								<text>
									¥{{ gunDetail.dischargeNowPrice.growthlePriceStr }}
								</text>
							</view>
						</view>
						<!-- 付费会员价展示 -->
						<view v-if="gunDetail.dischargeNowPrice.payleDiscount" class="img_view_831_bg">
							<image class="v_icon" mode="scaleToFill"
								src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/bgTag/icon-vip.png" />
							<view class="v_text">
								<text>
									¥{{ gunDetail.dischargeNowPrice.paylePriceStr }}
								</text>
							</view>
						</view>

					</view>

				</view>
			</view>
		</view>


		<view v-if="isLogin" class="zhifufangshi">
			<!-- 支付方式 0个人身份 其他车队身份 需登录 -->
			<view v-if="memberInfo.memberType == 0" class="payment_view">
				<view class="payment_type">
					<template v-for="(item, index) in paymentList">
						<view v-if="item.payType!=2" :key="index"
							:class="radio == item.payType ? 'payment_item current_payment_item' : 'payment_item'"
							:data-index="index" :data-paytype="item.payType" @tap="onChange($event)">
							{{ item.accountName }}
						</view>
					</template>
				</view>

				<!-- 以下目前是三种个人身份支付方式 -->
				<!-- 充完即退 -->
				<view v-if="radio=='-1'" class="payment_content">
					<view class="cwjt_box">
						<view v-if="!isZshAppInH5()" class="wx_box">
							<view class="wx_fl">
								<view class="wx_icon">
									<!-- #ifdef MP-ALIPAY-->
									<image src="https://oos-cn.ctyunapi.cn/front-end/static/mine/images/refund_zfb.png" mode="widthFix"/>
									<!-- #endif -->
									<!-- #ifndef MP-ALIPAY-->
									<image src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/pay-wx.png" mode="widthFix"/>
									<!-- #endif -->
								</view>
								<view class="wx_explain">
									<!-- #ifdef MP-ALIPAY-->
									<view class="wx_tit">支付宝支付</view>
									<!-- #endif -->
									<!-- #ifndef MP-ALIPAY-->
									<view class="wx_tit">微信支付</view>
									<!-- #endif -->
								</view>
							</view>
							<view class="wx_fr">
								<image
									src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/-s-checkbox_sel.png" />
							</view>
						</view>
						<view class="charging">
							<view class="t_fl">
								充电金额
							</view>
							<view class="t_fr">
								<input class="t_input" placeholder="请输入预付金额" type="digit" :value="customPrice"
									@input="getCustomPriceCwjt">
								<text>元</text>
							</view>
						</view>
						<view class="money_list">
							<view v-for="(item, index) in priceTypeListCwJt" :key="index"
								:class="'item_type_cwjt ' + (priceTypeCwjt == index ? 'item_type_action' : '')"
								:data-index="index" @tap="checkPriceType">
								{{ item }}元
							</view>
						</view>
						<view class="prompt_tip">
							<image src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/tip.png" />
							充电结束后未用完金额会自动退回
						</view>
					</view>
				</view>

				<!-- 微信支付分 -->
				<view v-if="radio=='-2'" class="payment_content">
					<view class="wxzff_box">
						<view class="wx_fl">
							<view class="wx_icon">
								<image src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/zfflogo.png" />
							</view>
							<view class="wx_explain">
								<view class="wx_tit">微信支付分</view>
								<view class="wx_des">550分及以上专享</view>
							</view>
							<view v-if="item.payType == 5" class="txt3" data-type="open"
								style="color: var(--textColor);margin-left: 10px;" @tap="choseDianliangCard">
								去选择充电卡
								<image class="turn_img"
									src="https://oos-cn.ctyunapi.cn/front-end/static/cartoon/turn_act.png" />
							</view>
						</view>
						<view class="wx_fr">
							<image src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/-s-checkbox_sel.png" />
						</view>
					</view>
				</view>

				<!-- 个人账户 -->
				<view v-if="radio=='1'" class="payment_content">
					<view class="grqb_box">
						<view class="available">
							<view class="t_fl">
								可用余额
								<text>{{ memberInfo.accountBalance }}元</text>
							</view>
							<view v-if="!isTjhz()" class="t_fr" data-type="open" @tap="rechargeVisible">
								立即充值
								<image src="https://oos-cn.ctyunapi.cn/front-end/static/cartoon/turn_act.png" />
							</view>
						</view>
						<view class="charging">
							<view class="t_fl">
								充电金额
							</view>
							<view class="t_fr">
								<input class="t_input" placeholder="请输入预付金额" type="digit" :value="customPrice"
									@input="getCustomPrice">
								<text>元</text>
							</view>
						</view>
						<view class="money_list">
							<view v-for="(item, index) in priceTypeList" :key="index"
								:class="'item_type ' + (priceType == index ? 'item_type_action' : '')"
								:data-index="index" @tap="checkPriceType">
								{{ item }}{{index == priceTypeList.length-1 ? '': '元'}}
							</view>
						</view>
						<view class="prompt_tip">
							<image src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/in.png" />
							充电结束后未用完金额会自动退回
						</view>
					</view>
				</view>

				<!-- 电量卡 -->
				<view v-if="radio=='5'" class="payment_content">
					<view class="grqb_box">
						<!-- <view class="available">
							<view class="t_fl">
								可用电卡  
								<text>{{ electricitydata.number }}/{{electricitydata.totalDegrees}}度</text>
							</view>
							<view class="t_fr" @tap="rechargeVisible" data-type="open">
								<image style="width:28rpx;height:28rpx" :src="base_url+'/group1/image/-s-checkbox_sel@2x3287574747679932873.png'"></image>
							</view>
						</view> -->
						<view class="charging">
							<view class="t_fl">
								充电量
							</view>
							<view class="t_fr">
								<input class="t_input" placeholder="请输入预设充电量" type="digit" :value="customPrice"
									@input="getCustomPrice">
								<text>度</text>
							</view>
						</view>
						<view class="money_list">
							<view v-for="(item, index) in priceTypeListDlk" :key="index"
								:class="'item_type ' + (priceType == index ? 'item_type_action' : '')"
								:data-index="index" @tap="checkPriceType">
								{{ item }}度
							</view>
						</view>
						<view class="prompt_tip" style='display:flex;justify-content: space-between'>
							<!-- <view @tap='electricCardtap'>电量卡名称:{{powerCard(electricCardid)}}</view> -->

							<view @tap='electricCardtap'>电量卡:
								<text v-if="Object.keys(electricCardidObj).length"
									class="dk_kWh">({{String(electricCardidObj.availableDegrees) ?electricCardidObj.availableDegrees : '--'}}/{{ String(electricCardidObj.amount) ? electricCardidObj.amount : '--'}})</text>
								<text v-else class="dk_kWh">(0/0)</text>
							</view>
							<view style='display:flex;align-items:center;'>
								<image :src="base_url+'/group1/image/icon@2x (20)3636896213083308170.png'"
									style="width:28rpx;height:28rpx" />
								预估金额：{{estimate ? estimate.toFixed(2) : '0.00'}}元
							</view>
						</view>
					</view>
				</view>

				<!-- 储值卡 -->
				<view v-if="radio=='6' && prepaidCardSwitch" class="payment_content">
					<view class="grqb_box">
						<view class="available">
							<view class="t_fl">可用余额 <text>{{ cardBalance }}元</text></view>
						</view>
						<view class="charging">
							<view class="t_fl">预设充电金额</view>
							<view class="t_fr">
								<input class="t_input" placeholder="请输入充电金额" type="digit" :value="customPrice" @input="getCustomPrice">
								<text>元</text>
							</view>
						</view>
						<view class="money_list">
							<view v-for="(item, index) in priceTypeList" :key="index"
								:class="'item_type ' + (priceType == index ? 'item_type_action' : '')"
								:data-index="index" @tap="checkPriceType">
								{{ item }}{{index == priceTypeList.length-1 ? '': '元'}}
							</view>
						</view>
						<view class="prompt_tip">
							<image src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/in.png" />
							充电费用达到上限或充满电量则自动停止充电
						</view>
					</view>
				</view>
			</view>
			<view v-else class="payment_view">
				<view class="payment_type payment_type2">
					<view class="payment_title">企业钱包</view>
				</view>
				<view class="payment_content">
					<view class="car_payment">
						车队账户
						<!-- 子成员 -->
						<text v-if="memberInfo.deductMode == 'LeaguerAccount'">
							（余额：<text style="color: #fc724c;">{{ memberInfo.carAccountBalance }}</text>元）
						</text>
						<!-- 车队 -->
						<text v-if="memberInfo.deductMode == 'TeamAccount'">
							（余额：<text style="color: #fc724c;">****</text>元）
						</text>
					</view>
					<view class="go_payment" @tap="goCarPayment()">
						查看详情 >
					</view>
				</view>
			</view>
		</view>


		<!-- <view v-if="item.payType == 1" style="display: flex;">
			（余额：
			<text class="money">{{ item.payType == 1 ? item.value : (memberInfo.deductMode == 'TeamAccount') ? '****' : item.value }}元</text>
			）
			<view class="txt2" @tap="rechargeVisible" data-type="open" v-if="item.payType == 1">
				去充值
				<image class="turn_img" :src="sellerNo=='jw'?'https://oos-cn.ctyunapi.cn/front-end/static/mine/images/turn-blue.png':'https://oos-cn.ctyunapi.cn/front-end/static/cartoon/turn_act.png'"></image>
			</view>
		
		</view> -->



		<!-- 绑定车牌 -->
		<view class="car_view">
			<view v-if="memberInfo.vehicles && memberInfo.vehicles.length > 0" class="is_car_true">
				<view class="car_title">
					<view class="car_name">{{ plateNoStr }}</view>
					<view class="car_edit" @tap="goCarList()">
						去修改
						<image src="https://oos-cn.ctyunapi.cn/front-end/static/cartoon/turn_act.png" />
					</view>
				</view>
				<view class="car_des">
					<view class="c_icon">
						<image src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/tip.png" />
					</view>
					<view class="c_text">
						停车说明: <text class="txt"
							v-text="stationDetail.parkingFeeDesc ? stationDetail.parkingFeeDesc : '暂无'" />
					</view>
				</view>
			</view>
			<view v-else class="is_car" @tap="goCarList()">
				<image class="add_img" src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/Add.png" />
				<text class="add_text">输入车牌号</text>
			</view>
		</view>

		<uni-card v-if="batteryCheckSwitch && systemConfig.batteryCheckOpen == 1" :border="false">
			<view class="flex-row-between">
				<view class="flex-row-between">
					<text style="color: #303133; font-size: 30rpx; margin-right: 16rpx">电池安全报告</text>
					<u-icon color="#303133" name="error-circle" size="27" @click="batteryTipsVisible = true" />
				</view>
				<u-checkbox-group v-model="batteryCheckVal" iconPlacement="right" placement="row">
					<u-checkbox :customStyle="{ columnGap: '20rpx' }" :icon-size="24"
						:label="'￥' + (systemConfig.batteryCheckBalance / 100).toFixed(2)" :label-size="24"
						labelColor="#1487FA" :name="1" shape="circle" :size="30" />
				</u-checkbox-group>
			</view>
			<view style="margin-top: 28rpx">勾选生成电池安全报告，费用含在账单内。深入剖析电池安全，让您充电无忧</view>
		</uni-card>


		<view style="margin:16rpx 26rpx">
			<placeholPileList :detail="stationDetail" />
		</view>

		<!-- 底部操作栏 -->
		<view v-if="isLogin" :class="{'fot_operation': true, 'fot_operation_v2g': isV2GOption}">
			<view class="reFresh" @tap="refresh">
				<image class="fot_img" src="https://oos-cn.ctyunapi.cn/front-end/static/homeSub/images/reFresh1.png" />
				<view>刷新</view>
			</view>

			<!-- [ ] 定时充电html  -->
			<view v-if="scheduleButton.show" style="flex: 1; margin-right: 12px;"> 
				<view 
					class="fot_btn fot_btn1" 
					:style="{backgroundColor: scheduleButton.bgc}" 
					@click="isTimeCofShow=true"
				>{{ scheduleButton.text }}</view>
			</view>

			<view class="btn-flex">
				<!-- #V2G功能 -->
				<template
					v-if="isV2GOption && gunDetail.dischargeNowPrice && Object.keys(gunDetail.dischargeNowPrice).length && memberInfo.memberType !=2">
					<view v-if="isInsert" class="discharge-btn" @click="openV2GDischarge">开启V2G放电</view>
					<view v-else class="discharge-btn discharge-btn-dis">开启V2G放电</view>
				</template>
				<view v-if="recharge.value" class="rechargeRemind">{{ recharge.text }}</view>
				<view v-if="sellerNo != 'xzl' && gunDetail.gunState == 1" class="rechargeRemind"
					:style="recharge.value ? 'top: -150rpx;' : 'top: -75rpx;'">请您在插枪后 点击启动</view>
				<!-- 判断有枪状态是空闲或者充电准备、桩号、余额、计费字段都有数据才能开启充电 2023.9.5-->
				<template v-if="isInsert && stationDetail.pileName && payment.length>0 && gunDetail.nowPrice">
					<view class="fot_btn fot_btn1" @tap="whetherChargeFd">{{ doubleGunSwitch && gunDetail1.gunid ? '双枪并充' : '开启充电' }}</view>
				</template>
				<template v-else>
					<view class="fot_btn fot_btn2 ">{{ doubleGunSwitch && gunDetail1.gunid ? '双枪并充' : '开启充电' }}</view>
				</template>
			</view>
		</view>

		<view v-if="!isLogin" class="fot_operation2">
			<view class="fot_btn" @tap="whetherCharge3">登录启动充电</view>
		</view>


		<!-- [ ] 定时充电弹窗 -->
		<u-popup mode="bottom" :show="isTimeCofShow" closeOnClickOverlay @close="isTimeCofShow=false">
			<view style="height: 30vh; padding: 24rpx; display: flex; flex-direction: column; justify-content: space-between;" >
				<u-cell-group :border="false">
					<u-cell 
						title="计划开始时间" 
						arrow-direction="right" 
						is-link 
						:value="timingValue" 
						:right-icon-style="{
							fontSize: '30rpx'
						}" 
						@click="openTimePicker"
					></u-cell>
				</u-cell-group>
				<u-button type="primary" :color="$u.color.success" @click="emitChargePlan">下发定时充电计划</u-button>
			</view>	

			<u-picker 
				:defaultIndex="defaultIndex"
				:columns="timeColumns" 
				:visibleItemCount="10"  
				:show="isTimeColumnsShow" 
        :itemHeight="68"
				@confirm="timeConfirm"
				@cancel="isTimeColumnsShow=false"
				></u-picker>
		</u-popup>



		<!-- 价格详情弹窗 -->
		<!-- <uni-popup round='25' :show="showPrice" position="bottom" @close="pricePopupVisible($event, { type: 'close' })" data-type="close" custom-class="price_popup">
            <view class="priceList">
                <view class="priceItem" v-for="(item, index) in priceList" :key="item.price_list">
                    <view class="priceTop">
                        <view class="first">
                            <image class="price_img" :src="item.stageIcon"></image>
                            <view class="txt">{{ item.timeStr }}</view>
                            <image class="price_current" v-if="item.nowPowerPrice" src="https://oos-cn.ctyunapi.cn/front-end/static/homeSub/images/current.png"></image>
                        </view>
                        <view class="txt1">
                            <text class="txt2">¥</text>
                            {{ item.totalPrice }}
                            <text class="txt3">元/度</text>
                        </view>
                    </view>

                    <view class="servePrice">{{ item.powerprice }}</view>
                </view>
            </view>
        </uni-popup> -->

		<u-popup custom-class="price_popup" data-type="close" mode="bottom" position="bottom" round='25'
			:show="showPrice" @close="closePricePopupVisible">
			<view class="box-info">
				<view class="title">电价收费详情</view>
				<view class="t1">
					<text>收费时段</text>
					<text v-if="isDisCharge">费用(元/度)</text>
					<text v-else>费用(元/度) = 电费 + 服务费</text>
				</view>

				<!-- 831价格收费详情抽离组件 -->
				<priceDetailView :isDisCharge="isDisCharge" :itemData="powerStageDetail" />

			</view>
			<!-- 充值中 -->
			<view v-if="rechargeLoading" class="recharge-loading">
				<view class="body">
					<image class="icon" mode="widthFix"
						src="https://oos-cn.ctyunapi.cn/front-end/static/static/recharge.png" />
					<view class="title">正在充值</view>
					<view class="desc">请勿关闭程序或窗口</view>
				</view>
			</view>
			<!-- 充值异常 -->
			<view v-if="rechargeError" class="recharge-error">
				<view class="body">
					<view class="title">
						<text>充值异常</text>
						<image class="close" mode="widthFix"
							src="https://oos-cn.ctyunapi.cn/front-end/static/static/close.png"
							@tap.stop.prevent="closeRechargeError" />
					</view>
					<view class="content">
						<view class="msg">{{ remark }}</view>
						<view class="phone">
							<text v-if="showStatus && phoneNumber">客服电话：{{ phoneNumber }}</text>
						</view>
					</view>
					<button class="btn"
						@tap.stop.prevent="calltel">{{ showStatus && phoneNumber ? '呼叫客服' : '我知道了' }}</button>
				</view>
			</view>
		</u-popup>
		<!-- 充完即退提示弹框 -->
		<u-popup closeable
			custom-style="width:580rpx;border-radius: 16rpx;padding: 24rpx 38rpx 40rpx;line-height: 48rpx;"
			mode='center' :show="showDisposable" @close="disposableVisible1">
			<view style="color: #3f4042;text-align: center;margin-bottom: 26rpx;font-size: 36rpx;">温馨提示</view>
			<view style="color: #3f4042;">预先支付充电费用，充电结束后自动退回多余费用；</view>
			<view style="color: #3f4042;">充电过程中，由于桩信息传输存在时差，可能会产生超出预付金额的情况，默认优先扣除个人账户的余额。</view>
		</u-popup>

		<!-- 充值弹窗 -->
		<u-popup closeable custom-style="width:674rpx;height:482rpx;border-radius: 16rpx;" mode='center'
			:show="showRecharge" @close="rechargeVisible1">
			<Payment style="padding:32rpx" @getbalance="getMemberInfo" />
		</u-popup>

		<!--绑定车辆对话框-->
		<!--<uni-popup ref="alertDialog" type="dialog">-->
		<!--<uni-popup-dialog type="info" :cancelText="cancelText" :confirmText="confirmText" title="温馨提示" :content="content" @confirm="dialogConfirm2" @close="dialogClose2"></uni-popup-dialog>-->
		<!--</uni-popup>-->

		<!--切换身份-->
		<UserTypePopup ref="UserTypePopup" :deductMode="memberInfo.deductMode" :userType="memberInfo.memberType"
			@dialogConfirm="dialogConfirm" />


		<!-- 可用卡券 -->
		<u-popup closeable
			custom-style="border-radius:16rpx;width:95%;margin:0 24rpx 37rpx;box-shadow: 4rpx 7rpx 20rpx 0rpx rgba(166,171,179,0.2400);padding:0 31rpx;background:#F5F7FA;"
			position="bottom" :show="cardCoupon" @close="cardCouponClose">
			<view class="card_wrap">
				<view class="card_title">本站可用优惠券</view>
				<view class="card_list" style="max-height: 500rpx">
					<view v-for="(items, index) in cardCouponList" :key="index" class="card_item" :data-id="items.id"
						@tap.stop.prevent="toCardCoupons">
						<!-- <image class="card_bg" src="http://oos-cn.ctyunapi.cn/front-end/static/marketingImg/homeSub/images/line_bg2.png"></image> -->

						<image v-if="items.applyStationType == 1" class="card_bg"
							:src="items.picture ? items.picture : 'http://oos-cn.ctyunapi.cn/front-end/static/marketingImg/homeSub/images/line_bg.png'" />

						<image v-if="items.applyStationType == 2 || items.applyStationType == 3" class="card_bg"
							:src="items.picture ? items.picture : 'http://oos-cn.ctyunapi.cn/front-end/static/marketingImg/homeSub/images/line_bg2.png'" />

						<view class="card_content">
							<view class="card_money">
								<view class="card_money_num">
									￥
									<text>{{ items.couponAmount }}</text>
								</view>
								<view v-if="items.applyStationType == 1" class="card_money_des">通用</view>
								<view v-if="items.applyStationType == 2 || items.applyStationType == 3"
									class="card_money_des">站点专属
								</view>
							</view>
							<view class="card_riqi">
								<view v-if="items.type == 1" class="card_riqi_title">服务费券</view>
								<view v-if="items.type == 2" class="card_riqi_title">电费券</view>
								<view v-if="items.type == 3" class="card_riqi_title">现金券</view>
								<view class="card_riqi_des">满{{ items.meetAmount }}可用</view>
								<view class="card_riqi_riqi">
									<view>
										<image class="card_riqi_icon"
											src="http://oos-cn.ctyunapi.cn/front-end/static/marketingImg/homeSub/images/icon1.png" />
										{{ items.receiveTime }}
									</view>
									<view>
										<image class="card_riqi_icon"
											src="http://oos-cn.ctyunapi.cn/front-end/static/marketingImg/homeSub/images/icon2.png" />
										{{ items.expireTime }}
									</view>
								</view>
							</view>
							<view class="card_xd">
								{{ items.applyStationTypeStr }}
								<image class="card_xd_icon"
									src="http://oos-cn.ctyunapi.cn/front-end/static/marketingImg/homeSub/images/turn.png" />
							</view>
						</view>
					</view>
				</view>
			</view>
		</u-popup>

		<!-- 双枪弹窗 -->
		<u-popup :show="showSelectGun" mode="center" round="15" @close="showSelectGun=false">
			<view class="selectGun_title">请选择新增的枪</view>
			<scroll-view class="selectGun_box" :scroll-y='true'>
				<view v-for="(gunItem, gunIndex) in gunDTOList" :key="gunIndex" class="siteGun_view siteGun_view_item" @click='selectGun(gunItem)'>
					<view class="site_img">
						<image
							:src="stationDetail.stationIcon ? stationDetail.stationIcon : 'https://oos-cn.ctyunapi.cn/front-end/static/static/pic.png'" />
					</view>
					<view class="site_des">
						<view class="site_title">
							{{ stationDetail.stationName }}
							<view class="gun_status">
								<text v-if="gunItem.gunState == 1" class="gun_text">空闲</text>
								<text v-if="gunItem.gunState == 2" class="gun_text">充电准备</text>
								<text v-if="gunItem.gunState == 4" class="gun_text">充电完成</text>
								<text v-if="gunItem.gunState == 3" class="gun_text">充电中</text>
								<text v-if="gunItem.gunState == 5" class="gun_text">离线</text>
								<text v-if="gunItem.gunState == 6" class="gun_text">充电锁定</text>
								<text v-if="gunItem.gunState == 7" class="gun_text">故障</text>
								<text v-if="gunItem.gunState == 8" class="gun_text">预约</text>
								<text v-if="gunItem.gunState == 9" class="gun_text">禁用</text>
								<text v-if="gunItem.gunState == 255" class="gun_text">默认</text>
							</view>
						</view>
						<view class="site_gunId">
							枪口编号：{{ gunItem.pileno }}-{{ gunItem.gunno }}
						</view>
						<view class="site_gun_des">
							{{gunItem.currentMode}}<text
								class="tagDivision" />{{gunItem.powerMode==1?'慢充':gunItem.powerMode==2?'快充':'超充'}}<text
								class="tagDivision" />{{ gunItem.ratedPower }}kw
						</view>
					</view>
				</view>
			</scroll-view>
		</u-popup>

	</view>
</template>

<script>
	// // 备注
	// memberType:
	// 	0 个人  
	// 	1 车队子成员
	// 	2 车队

	// payType:
	// 	1 个人账户
	// 	2 车队账户
	// 	-1 充完即退
	// 	-2 微信支付分

	'use strict';
	// import vanCircle from '@vant/weapp/circle/index';
	// import vanPopup from '@vant/weapp/popup/index';
	// import vanRadio from '@vant/weapp/radio/index';
	// import vanRadioGroup from '@vant/weapp/radio-group/index';

	var util = require('@/utils/util.js');
	var debounce = new util.Debounce();

	import {
	getStationCoupon,
	getStationDiscount
} from '../../../../api/marketing/stationListApi';

	import {
	currentTemplateId,
	queryWxOrder
} from '@/api/zhifufen';
import {
	getMyOccupyBillPage
} from '@/api/placeholder.js';
import {
	getSellerPayConfigBySellerId
} from '@/api/apiServe';
import Payment from '@/components/payment/payment';
import placeholPileList from 'homeSub/components/placeholPileList/placeholPileList';
import UserTypePopup from '@/components/switchUserType/userTypePopup';


	// 电价收费详情
	import priceDetailView from '@/components/priceDetailView/pileDetailView.vue';
import {
	getWechatMiniProgramTemplateId
} from '@/api/wechatMiniProgramTemplateId';
import {
	gettotalDegreeQuery,
	getpowerCardSelectionList,
	getchargeConversionAmountQuery,
	getdegreeLockAmountQuery
} from './../../../../api/marketing/rechargeApi.js';

	import {
	getSystemConfiguration
} from '@/api/batteryCheck';
import { queryCardBalance } from "@/api/storedCard.js";

	// #ifdef H5
	import { toCDGJWechatMiniPay, toCDGJH5UrlPay } from '@/utils/h5.js';
	// #endif

	var app = getApp();
	var https_1 = require('./../../../../api/https.js');
	var Interval = null;
	let waitingTimes = ''
	// #ifdef APP-PLUS
	let KJOpenBusinessView = uni.requireNativePlugin('JXUNIPlugin-JXUniPluginModule');
	// #endif

	import { toast } from '@/utils/tools.js';
	export default {
		components: {
			// vanCircle,
			// vanPopup,
			// vanRadio,
			placeholPileList,
			Payment,
			UserTypePopup,
			priceDetailView,
		},
		data() {
			return {
				plateNoStr: undefined,
				sellerNo: app.globalData.sellerNo,
				kycContent: '', //康亿创文本
				showDisposable: false,
				showRecharge: false,
				getRechargeResultNum: 1,
				rechargeLoading: false,
				rechargeError: false,
				remark: '',
				phoneNumber: '',
				showStatus: false,
				memberInfo: {
					vehicles: '',
					memberType: 0,
					deductMode: ''
				},
				cancelText: '',
				confirmText: '',
				content: '',
				stationDetail: {
					stationId: '',
					stationIcon: false,
					stationName: '',
					stationAddress: '',
					parkingFeeDesc: false
				},

				gunDetail: {
					gunState: 0,
					soc: '',
					gunName: '',
					powerMode: 0,
					gunid: '',
					electPrice: '',
					nextStageTime: false,
					nextStageBalance: false,
					nowPrice: {},
					nextStagePrice: {}
				},

				priceList: [],
				isInsert: false,
				status: 1,
				//当前选中的支付类型
				radio: '1',
				payment: [],

				//默认选中的支付金额下标
				priceTypeCwjt: -1,
				priceType: 3,
				rechargeIndex: 0,
				base_url: app.globalData.imgUrl,
				customRechargePrice: '',
				customPrice: '',
				showPrice: false,
				//priceTypeList: ['100', '60', '30', '全部余额'],
				//充完即退金额
				priceTypeListCwJt: ['30', '50', '100'],
				priceTypeList: ['30', '50', '100', '全部余额'],
				priceTypeListDlk: ['30', '50', '100', '200'],
				chargeParameter: {},
				pileNo: '',
				gunid: '',
				gunno: '',
				plateNo: '',
				estimate: 0,
				guns: [{
						value: 0,
						name: 'A'
					},
					{
						value: 1,
						name: 'B'
					},
					{
						value: 2,
						name: 'C'
					},
					{
						value: 3,
						name: 'D'
					},
					{
						value: 4,
						name: 'E'
					},
					{
						value: 5,
						name: 'F'
					},
					{
						value: 6,
						name: 'G'
					},
					{
						value: 7,
						name: 'H'
					},
					{
						value: 8,
						name: 'I'
					},
					{
						value: 9,
						name: 'J'
					},
					{
						value: 10,
						name: 'K'
					},
					{
						value: 11,
						name: 'L'
					},
					{
						value: 12,
						name: 'M'
					},
					{
						value: 13,
						name: 'N'
					},
					{
						value: 14,
						name: 'O'
					},
					{
						value: 15,
						name: 'P'
					},
					{
						value: 16,
						name: 'Q'
					},
					{
						value: 17,
						name: 'R'
					},
					{
						value: 18,
						name: 'S'
					},
					{
						value: 19,
						name: 'T'
					},
					{
						value: 20,
						name: 'U'
					},
					{
						value: 21,
						name: 'V'
					},
					{
						value: 22,
						name: 'W'
					},
					{
						value: 23,
						name: 'X'
					},
					{
						value: 24,
						name: 'Y'
					},
					{
						value: 25,
						name: 'Z'
					}
				],

				recharge: {
					text: '余额不足请充值',
					value: false
				},
				powerStageDetail: [],
				dataShow: false,
				tips: '',
				orderNo: '',
				outTradeNo: '',
				payType: 1,
				isChange: false,
				placeholdOrderCount: 0, //占位订单数量
				placeholdOrderDetail: {}, //占位订单详情
				unifiedOrderStstus: false,
				paymentList: [],
				isLogin: false,
				electricitydata: '',
				//可用卡券弹窗
				cardCoupon: false,
				cardCouponList: [],
				electricCard: [],
				electricCardid: '',
				// 当前电量卡对象
				electricCardidObj: {},
				//站点详情 优惠说明
				stationCouponDetail: {
					enableCouponCount: '',

					consume: {
						activityDetail: {
							id: ''
						}
					},

					single: {
						activityDetail: {
							id: ''
						}
					},

					stationDiscount: {
						activityDetail: {
							id: ''
						}
					}
				},

				ljxfDetail: {},
				dbzkDetail: {},
				zdyhDetail: {},
				userTypes: '',
				stationCouponPriceDetail: {},
				yhsmBox: false,
				wxTemplateIds: [],
				wxTemplateIds1: [],
				// 商家支付配置
				sellerPayConfigBySellerId: {},
				platformNo: '', //扫码域名
				carIsDisCharge: false, // 当前车辆是否开启v2g #V2G功能
				isDisCharge: false, // 是否是放电 #V2G功能
				appType: 'mini',
				zhiFuFenBusId: '',
				isReorderPay: false, // 防止微信支付分二次拉起时重复调用
				systemConfig: {},
				batteryCheckVal: [],
				batteryTipsVisible: false,
				hasStateGrid: null,
				qrCode: '',
				codeSellerType: '',
				connectorID: '',
				isH5PayCallback: false, // 是否是H5支付回调

				// #region 定时充电相关字段
				timeColumns: [],
				isTimeColumnsShow: false,
				timingValue: '',
				defaultIndex: [0],
				isTimeCofShow: false,
				// #endregion
				cardBalance: '0.00', // 储值卡金额

				/* 双枪 start */
				showSelectGun:false,
				gunDTOList:[],
				gunDetail1: {
					gunState: 0,
					soc: '',
					gunName: '',
					powerMode: 0,
					gunid: '',
					electPrice: '',
					nextStageTime: false,
					nextStageBalance: false,
					nowPrice:{},
					nextStagePrice:{}
				},
				/* 双枪 end */
			};
		},

		computed: {
			// [ ] 定时充电timingButton
			scheduleButton() {
				return {
					show: app.globalData.scheduleSwitch,
					disabled: false,
					text: '定时充电',
					bgc: '#eaa328'
				}
			}
		},

		/**
		 * 生命周期函数--监听页面加载
		 */
		onLoad: function(options) {
			console.log("枪页面", options)
			console.warn("*********************gunDetail=>>>>>>>>", options)

			if (this.isnylH5() || this.isZshAppInH5()) {
				uni.setStorageSync('gunDetailOptions', options)
			}
			if (options.status) {
				this.status = options.status
			}

			if (options.pileNo) {
				this.pileNo = options.pileNo
			}

			if (options.gunNo) {
				this.gunno = options.gunNo
			}
			if (options.gunid) {
				this.gunno = options.gunNo
			}


			if (options.kycText) {
				this.kycContent = options.kycText
			}
			if (options.hasStateGrid == 1 && options.qrCode) {
				this.hasStateGrid = options.hasStateGrid,
					this.qrCode = options.qrCode
			}

			this.pileNo = options.pileNo
			this.gunid = options.gunid || ''

			//   营销获客处理
			if (options.stationId) {
				this.setData({
					stationId: options.stationId
				});
			}


			this.codeSellerType = options.codeSellerType || ''
			this.connectorID = options.connectorID || ''
			this.platformNo = options.platformNo || ''


			this.loopFetchDTO()

			// waitingTimes = setInterval(() => {
			// 	Promise.all([this.getPileDTOByNo()]);
			// }, 5000)

			//  if (options.preFrozenAmount && options.qrCode) {
			// 	 this.preFrozenAmount = options.preFrozenAmount,
			// 	 this.qrCode = options.qrCode
			//     }

			//需要登录
			if (uni.getStorageSync('token')) {
				// 	this.currentTemplateId()
				// this.subscribeTemplateId()
				uni.removeStorageSync('ElectricityTabIndex')
				uni.removeStorageSync('ElectricityId')
			}

			// 获取电池检测配置
			if (this.batteryCheckSwitch) {
				this.getSystemConfiguration();
			}

			// H5支付完成后回调处理-即充即退逻辑
			if (options.isH5PayCallback && this.isCdgj()) {
				this.isH5PayCallback = true
				this.orderNo = options.orderNo || ''
				this.unifiedOrderStstus = false
				this.customPrice = options.customPrice
				console.log('----H5支付完成后回调处理-即充即退逻辑----');
				
				if (options.status === 'fail') {
					this.cancelCharge() // 支付失败
				} else {
					this.getRechargeResult(); // 支付成功-查询充值状态
				}
			}
		},
		/**
		 * 生命周期函数--监听页面显示
		 */
		onShow: function() {
			gettotalDegreeQuery().then(res => {
				console.log(res, '获取当前加电卡')
				this.electricitydata = res.data
			})
			getpowerCardSelectionList(this.stationId).then(res => {
				this.electricCard = res.data.filter(i => i.notApplyStatus === 1)
				if (uni.getStorageSync('ElectricityId')) {
					this.electricCardid = uni.getStorageSync('ElectricityId')
				} else {
					if (this.electricCard[0]) {
						this.electricCardid = this.electricCard[0].id
					}
				}
				// 将当前的电量卡对象在数组中找出来赋值
				let electricCardidList = res.data.filter(i => i.notApplyStatus === 1)
				if (electricCardidList.length) {
					electricCardidList.map(item => {
						if (item.id == this.electricCardid) {
							this.electricCardidObj = item
						}
					})
					console.log(this.electricCardidObj, '当前电量卡')
				}
			})
			if (this.radio == '5') {
				this.validateChargeCardDegree()
			}
			console.log(app.globalData.imgUrl, '获取图片链接')
			//移动端优化 未登录扫码进入枪详情后
			if (uni.getStorageSync('token')) {
				this.isLogin = true

				//营销获客 优惠
				let userInfo = uni.getStorageSync('userInfo');
				console.log(userInfo);
				if (userInfo.memberType == 0) {
					this.userTypes = '1';
				} else {
					this.userTypes = '2';
				}

				const that = this
				// 充完即退合并
				https_1.selectAbnormalConfig().then(function(res) {
					if (res.code == 0 && res.data) {
						that.remark = res.data.remark,
							that.phoneNumber = res.data.telephone,
							that.showStatus = res.data.showStatus === 1 ? true : false
					}
				});
				// 获取占位订单
				this.getMyOccupyBillPage()

				if (this.codeSellerType == 'sudiantong') {
					this.getRealyFnSudiantong()
				} else {
					this.getRealyFn()
				}

				this.getSellerPayConfigBySellerId()
			} else {
				this.isLogin = false

				this.getPileDTOByNo()
			}

			// #ifdef APP-PLUS
			this.appType = 'app'
			// #endif
		},
		/**
		 * 生命周期函数--监听页面隐藏
		 */
		onHide: function() {
			getApp().globalData.plateNo = ''
			clearInterval(waitingTimes)
		},
		/**
		 * 生命周期函数--监听页面卸载
		 */
		onUnload: function() {
			getApp().globalData.plateNo = ''
			clearInterval(waitingTimes)
			clearTimeout(this.timer)
		},
		/**
		 * 用户点击右上角分享
		 */
		onShareAppMessage: function() {},
		methods: {
			async loopFetchDTO(){
				await this.getPileDTOByNo()
				if(this.timer) clearTimeout(this.timer)
					this.timer = setTimeout(() => {
						this.loopFetchDTO()
					}, 5000);
			},
			emitChargePlan(){
				if(!this.timingValue) return toast('请选择充电时间!')
				this.isTimeCofShow=false
				console.log(this.timingValue);
			},
			openTimePicker(){
				const hour = new Date().getHours()
				const columns = []
				let h = 0
				for(let i = 1; i <= 24; i++) {
					h = (hour + i) % 24
					h = h.toString().padStart(2,0) + ':00'
					columns.push(h)
				}
				this.timeColumns = [columns]
				this.defaultIndex = [this.timeColumns.findIndex(str=>str==this.timingValue)||0]
				this.isTimeColumnsShow = true
			},

			timeConfirm({value}){
				this.timingValue = value[0]
				this.isTimeColumnsShow = false
			},
			
			// 获取储值卡余额
			async getCardBalance() {
				const _params = {
					memberMobile: this.memberInfo.telephone
				}
				let {data}  = await queryCardBalance(_params)
				this.cardBalance = (Number(data)/100).toFixed(2)
			},

			getBatteryParams() {
				if (!this.batteryCheckVal.length) return '';
				return `&batteryCheckOpen=${this.systemConfig.batteryCheckOpen}&batteryCheckBalance=${this.systemConfig.batteryCheckBalance}`;
			},

			getSystemConfiguration() {
				getSystemConfiguration().then((res) => {
					this.systemConfig = res.data;
				});
			},

			getSellerPayConfigBySellerId() {
				getSellerPayConfigBySellerId(getApp().globalData.sellerId).then(res => {
					console.log('这是商家配置11', res)
					if (res.code == 0) {
						this.sellerPayConfigBySellerId = res.data || {}
						// this.sellerPayConfigBySellerId.isUseCcbPay = true
					}
				})
			},
			electricCardtap() {
				uni.navigateTo({
					url: '/homeSub/pages/terminal/gunDetail/cardVoucherYx?stationId=' + this.stationId
				})
				this.customPrice = ''
				this.priceType = -1
			},
			powerCard(e) {
				let kaname = ''
				console.log(e)
				this.electricCard.map(item => {
					if (item.id == e) {
						kaname = item.cardTypeStr || '充电卡'
					}
				})
				return kaname
			},
			//可用卡券信息
			getStationCouponDetail() {
				const tmp = this;
				getStationCoupon({
						stationId: this.stationId,
						userId: uni.getStorageSync('memberId'),
						userType: this.userTypes
					})
					.then((res) => {
						console.log(res.data, 'kkkkkkkkkkk');
						if (res.code == 200) {
							res.data.forEach((item) => {
								if (item.applyStationType == 1) {
									item.applyStationTypeStr = '所有站点';
								} else if (item.applyStationType == 2) {
									item.applyStationTypeStr = '指定站点';
								} else if (item.applyStationType == 3) {
									item.applyStationTypeStr = '指定条件';
								}
							});
							tmp.setData({
								cardCouponList: res.data
							});
						}
					})
					.catch((err) => {
						console.log(err);
					});
			},

			//获取站点终端优惠说明 //不传车和终端的是否超充类型
			getStationDiscounts(applyTerminalStatus, applyModelStatus) {
				console.log('终端优惠说明.....');
				getStationDiscount({
						stationId: this.stationId,
						userId: uni.getStorageSync('memberId'),
						userType: this.userTypes
						// applyTerminalStatus: applyTerminalStatus,
						// applyModelStatus: applyModelStatus,
					})
					.then((res) => {
						console.log(res.data, 'yhsm........!!!!!!!!!!!!!!!!');
						if (res.code == 200 && res.data) {
							this.setData({
								stationCouponDetail: res.data,
								ljxfDetail: res.data.consumeRewardMemo,
								dbzkDetail: res.data.singleRewardMemo,
								zdyhDetail: res.data.stationDiscount ? res.data.stationDiscount
									.serviceFeeDiscountDetail : null,
								yhsmBox: true
							});
							console.log(this.ljxfDetail, 'lll...');
							console.log(this.dbzkDetail, 'ddd...');
							console.log(this.zdyhDetail, 'zzz...');
						} else {
							this.setData({
								yhsmBox: false
							});
						}
					})
					.catch((err) => {
						console.log(err);
					});
			},

			// 可用卡券弹窗
			cardCouponShowPopup() {
				this.setData({
					cardCoupon: true
				});
			},

			cardCouponClose() {
				this.setData({
					cardCoupon: false
				});
			},
			getchargeConver() {
				getchargeConversionAmountQuery({
					chargeDegree: this.customPrice,
					pileNo: this.pileNo,
					gunId: this.gunDetail.gunid,
					sellerId: getApp().globalData.sellerId,
				}).then(res => {
					this.estimate = res.data.price
				})
			},
			//去优惠券卡券详情
			toCardCoupons(e) {
				console.log(e.currentTarget.dataset);
				uni.navigateTo({
					url: '/homeSub/pages/discount/cardCoupons/cardCoupons?id=' + e.currentTarget.dataset.id
				});
			},

			// 累计消费
			goCumulativeMoney(e) {
				// wx.navigateTo({
				//     url: '/homeSub/pages/discount/cumulativeMoney/cumulativeMoney'
				// })
				console.log(e.currentTarget.dataset, 'llllllllll');
				uni.navigateTo({
					url: '/homeSub/pages/discount/cumulativeMoney/cumulativeMoney?HD=' +
						`${e.currentTarget.dataset.hdid}`
				});
			},

			// 单笔折扣
			goSingleMoney(e) {
				// wx.navigateTo({
				//     url: '/homeSub/pages/discount/singleMoney/singleMoney'
				// })
				console.log(e.currentTarget.dataset, 'dddddddd');
				uni.navigateTo({
					url: '/homeSub/pages/discount/singleMoney/singleMoney?HD=' + `${e.currentTarget.dataset.hdid}`
				});
			},

			// 站点优惠
			goSiteOffers(e) {
				// wx.navigateTo({
				//     url: '/homeSub/pages/discount/siteOffers/siteOffers'
				// })
				console.log(e.currentTarget.dataset, 'zzzzzzz');
				uni.navigateTo({
					url: '/homeSub/pages/discount/siteOffers/siteOffers?HD=' + `${e.currentTarget.dataset.hdid}`
				});
			},



			getRealyFn() {
				const that = this
				const params = {
					pileNo: this.pileNo || 'undefined',
					gunNo: this.gunno,
					qrCode: this.pileNo || 'undefined',
					platformNo: this.platformNo || null,
				}

				if (!this.pileNo) {
					params.connectorID = this.gunno
				}
				

				https_1.querChargeRealy(params).then(async function(res) {
					if (res.code == 0 && res.data) {
						that.gunno = res.data.gunNo
						that.pileNo = res.data.pileNo
					}
					Promise.all([that.getPileDTOByNo(), that.getMemberInfo()]);
				})
				// this.getInitPayType()
				this.getUserType()
			},
			getRealyFnSudiantong() {
				const that = this
				https_1.querChargeRealy({
					pileNo: this.pileNo,
					gunNo: this.gunno,
					connectorID: this.connectorID,
				}).then(async function(res) {
					that.gunno = res.data.gunNo
					that.pileNo = res.data.pileNo
					Promise.all([that.getPileDTOByNo(), that.getMemberInfo()]);
				})
				// this.getInitPayType()
				this.getUserType()
			},
			// 获取占位订单
			getMyOccupyBillPage() {
				getMyOccupyBillPage({
					// memberId:uni.getStorageSync('memberId'),
					billStatus: 11,
					current: 1,
					pageSize: 10
				}).then(res => {
					let records = res.data.records || []
					if (records.length) {
						this.placeholdOrderCount = records.length
						this.placeholdOrderDetail = records[0]
					} else {
						this.placeholdOrderCount = 0
					}
				})
			},

			//获取站点详情(查询枪最低价格信息)
			getStationGunPriceDetail: function(gunId, isDisCharge = false) {
				var that = this;
				let getApiUrl = uni.getStorageSync('token') ? https_1.getStationGunDetails : https_1
					.getStationGunDetailsNotAuth
				getApiUrl(gunId).then((res) => {
					if (res.code == 0) {
						// #V2G功能
						this.isDisCharge = isDisCharge
						this.powerStageDetail = isDisCharge ? (res.data?.dischargePowerStageDetail || []) : (
							res.data?.powerStageDetail || []);
						that.showPrice = true
					}
				}).catch(err => {
					uni.showToast({
						title: err,
						icon: "none",
						duration: 2000,
					})
				})
			},
			// 获取初始的payType
			async getInitPayType() {
				await https_1.getMemberInfo({}).then((res) => {
					if (res.code == 0) {
						this.setData({
							memberType: res.data.memberType
						})
					}
				})
				if (res.data.memberType == 0) {
					await this.getQuery(true)
				} else {
					await this.getQuery()
				}
				await https_1.queryList({}).then((res) => {
					if (res.code == 0) {
						if (this.memberType == 0) {
							this.setData({
								payType: 1
							})
						} else {
							switch (res.data[0].payType) {
								case 1:
									this.setData({
										payType: 1
									})
									break;
								case 2:
									this.setData({
										payType: 2
									})
									break;
								case -1:
									this.setData({
										payType: 1
									})
									break;
							}
						}
						let index = this.payment.findIndex((item) => {
							return this.payType == item.payType
						})
						console.log(this.payment, '222')
						this.setData({
							priceTypeCwjt: 2,
							priceType: 3,
							customPrice: this.payment[index].value
						})
					}
				})

			},
			switchUserType() {
				this.$refs.UserTypePopup.$refs.alertDialog.open()
			},
			dialogConfirm2() {
				console.log(11)
			},
			dialogClose2() {
				console.log(22)
			},
			dialogConfirm(e) {
				this.memberInfo.memberType = e
				uni.setStorageSync('memberType', e)
				this.getPileDTOByNo(e)
				this.$refs.UserTypePopup.$refs.alertDialog2.close()
				if (this.memberInfo.memberType == 1 || this.memberInfo.memberType === 2) {
					this.radio = '2'
				} else {
					this.radio = '1'
				}
				this.getMemberInfo()
			},
			// 获取枪详情
			getPileDTOByNo: function(type = '') {
				// console.log(type, '枪号类型..........')

				var that = this;
				// let data = type.toString()?{pileNo: this.pileNo, type:(type == 2 || type == 1)?1:0}:{pileNo: this.pileNo}
				let data = type.toString() ? {
					pileNo: this.pileNo || 'undefined',
					type: (type == 2 || type == 1) ? 1 : 0,
					kycContent: this.kycContent,
					sellerId: getApp().globalData.sellerId
				} : {
					pileNo: this.pileNo || 'undefined',
					kycContent: this.kycContent,
					sellerId: getApp().globalData.sellerId,
				}

				data.platformNo = that.platformNo || null;

				if (that.connectorID) {
					// connectorID 抢号有值，优先使用
					data.connectorID = that.connectorID
				} else if ((!that.isLogin || !that.pileNo) && that.gunno) {
					data.connectorID = that.gunno // 未登录时-兼容招小服-理想充电二维码规则
				}

				return https_1
					.getPileDTOByNo(data)
					.then(function(res) {
						if (res.code == 0) {
							var gunDTO_1 = {};
							var pluggable_1 = false;
							// console.log("打印getPileDTOByNo", res, res.code)

							if ((!that.isLogin || !that.pileNo) && res.data.gunDTOList && res.data.gunDTOList
								.length) {
								// 未登录时，默认选中第一个枪
								that.gunno = res.data.gunDTOList[0].gunno;
								that.pileNo = res.data.pileNo;
							}

							// #双枪处理
							if (that.doubleGunSwitch) {
								that.gunDTOList = res.data.gunDTOList.filter(item=>item.gunno != that.gunno)
							}

							res.data.gunDTOList.map(function(item) {

								if (that.doubleGunSwitch && !item.gunName) {
									item.gunName = that.guns[item.gunno].name + '枪';
								}
								const isxiaoju = !that.isLogin && item.gunName == that.gunno // 小桔兼容没登录状态
								if (item.gunno == that.gunno || isxiaoju) {
									// console.log("打印item.gunid == that.gunid", item.gunid == that.gunid)
									if (item.hasContract && that.payType == 2) {
										item.electPrice = Number(item.contractElectPrice).toFixed(2)
										item.nextStageBalance = Number(item.contractNextStageBalance)
											.toFixed(2)
										item.nextStageTime = item.contractNextStageTime
									} else {
										item.electPrice = (item.electPrice / 100).toFixed(2)
										item.nextStageBalance = (item.nextStageBalance / 100).toFixed(2)
										item.nextStageTime = item.nextStageTime
									}
									// item.electPrice = (item.electPrice / 100).toFixed(4);
									// item.nextStageBalance = (item.nextStageBalance / 100).toFixed(4);

									if (!item.gunName) {
										item.gunName = that.guns[item.gunno].name + '枪';
									}
									gunDTO_1 = item;
									// 1 空闲  2  充电准备 3 充电中  4 充电完成  5 离线  6 充电锁定  7  故障  8 预约  9 禁用  255 默认  国网状态 item.hasStateGrid
									if (item.gunState == 2) {
										pluggable_1 = true;
									}
									// 中研空闲要求可以启动充电
									if (app.globalData.sellerNo == 'ZY' || app.globalData.sellerNo == 'xzl') {
										if (item.gunState == 1) {
											pluggable_1 = true;
										}
									}

									// 双枪充电处理
									if(that.doubleGunSwitch && that.gunDetail1.gunid){
										pluggable_1 = (item.gunState == 2 && that.gunDetail1.gunState == 2)
									}

									if (!isxiaoju) {
										that.gunno = item.gunno
									}
									that.isInsert = pluggable_1
									that.gunid = item.gunid

									that.stationDetail = res.data.stationData,
										that.stationDetail.pileName = res.data.pileName
									that.gunDetail = gunDTO_1


									// console.log(that.gunDetail, '枪详情.....')


									// 判断枪状态,跳转到枪状态页
									if (that.gunDetail.gunState == 7 || that.gunDetail.gunState == 3 ||
										that.gunDetail.gunState ==
										5 || that.gunDetail.gunState == 6) {
										// uni.redirectTo({
										// 	url: '../fault/fault?pileNo=' + that.pileNo + '&gunid=' + that.gunid+'&status='+that.gunDetail.gunState
										// });

										// console.log(that, '枪状态是不正常的.........')
										uni.redirectTo({
											url: '../fault/fault?pileNo=' + that.pileNo +
												'&gunid=' + that.gunid + '&status=' +
												that.gunDetail.gunState + "&kycText=" + that
												.kycContent
										});
									}


									// 营销获客处理
									// console.log('获取终端详情的超充标识====>终端&车.....', res.data.pileData
									// 	.overchargeTermina, res.data.pileData
									// 	.overchargeCar);
									// this.getStationDiscounts(res.data.pileData.overchargeTermina, res.data.pileData.overchargeCar)

									let terminaNum;
									if (gunDTO_1.powerMode == 1 || gunDTO_1.powerMode == 2) {
										terminaNum = 2;
										// console.log('超充终端.......')
									} else {
										terminaNum = 3;
										// console.log('非超充终端.......')
									}

									// console.log(gunDTO_1, '单个终端详情gunDTO_1...................')

									//获取站点id
									that.setData({
										stationId: res.data.stationId
									});

									//终端详情页面有营销获客活动返回时, 请求卡券及活动....
									if (gunDTO_1.marketing) {
										// console.log(gunDTO_1.marketing, "终端详情有marketing设置~~~~~~~~~~~~")
										// 获取终端优惠说明接口
										that.getStationDiscounts(terminaNum, res.data.pileData
											.overchargeCar);
										that.getStationCouponDetail();
									}
									// console.log(gunDTO_1, '终端单价......');
									// console.log(that.gunDetail, 'ddddddzzzzzzzz');
								}
							});
						} else if (res.code == 50014 || res.code == 50015 || res.code == 50016) {
							// 当接口返回50016，当前站点已下线
							uni.redirectTo({
								url: '/homeSub/pages/terminal/fault/fault0131?pileText=' + res.msg
							});
						} else {
							// wx.navigateBack()
							//   wx.switchTab({
							//     url:'../../../../pages/index/index'
							//  })
							uni.showToast({
								title: res.msg,
								icon: 'error',
								duration: 2000
							});
						}
					});
			},

			// 获取个人信息
			getMemberInfo: function() {
				var that = this;
				return https_1.getMemberInfo().then(async function(res) {
					var plateNo = '';

					if (res.data.vehicles && res.data.vehicles.length > 0) {
						res.data.vehicles.map(function(item) {
							if (item.defaultVehicle == 0) {
								plateNo = item.plateNo;
								// #V2G功能
								if (that.isV2GOption) {
									that.carIsDisCharge = item.disCharge || false
								}
							}
						});
					}

					var data = res.data;

					if (data.accountBalance) {
						// 余额 = 余额-冻结金额-奖励金金额 
						data.accountBalance = ((data.accountBalance - data.frozenAmount - data
								.jlAccountBalance) / 100)
							.toFixed(2);

						if (data.accountBalance <= 0) {
							data.accountBalance = '0.00'
						}
					} else {
						data.accountBalance = '0.00';
					}

					if (data.carAccountBalance) {
						data.carAccountBalance = (data.carAccountBalance / 100).toFixed(2);
					} else {
						data.carAccountBalance = '0.00';
					}
					if (uni.getStorageSync('memberType').toString()) {
						data.memberType = uni.getStorageSync('memberType')
					} else {
						uni.setStorageSync('memberType', data.memberType)
					}
					// 车牌号赋值给后端传参用
					that.plateNo = plateNo || getApp().globalData.plateNo

					let plateNoArr = plateNo.split('')
					let plateNoS1 = plateNoArr.splice(1, 0, " ");
					let plateNoS2 = plateNoArr.splice(3, 0, "·");
					let plateNoStrs = plateNoArr.join('')
					that.plateNoStr = plateNoStrs
					console.log(plateNoArr, 'plateNoArr...')
					console.log(plateNoS1, 'plateNoS1...')
					console.log(plateNoS2, 'plateNoS2...')
					console.log(plateNoStrs, 'plateNoStrs...')



					that.memberInfo = data

					that.rechargeVisible1()
					if (data.memberType == 0) {
						if (that.prepaidCardSwitch) {
							// 获取储值卡余额
							await that.getCardBalance()
						}

						that.getQuery(true);
					} else {
						that.getQuery();
					}
					if (that.radio != 5) {
						that.minimumAmount();
					}

				});
			},
			goCarPayment: function() {
				uni.navigateTo({
					url: '/mine/pages/personalAccount/personalAccount'
				});
			},
			goCarList: function() {
				uni.navigateTo({
					url: '/mine/pages/myCarList/myCarList?type=select'
				});
			},
			goLogin: function() {
				uni.navigateTo({
					url: '/packagePersonal/pages/login/login'
				});
			},

			closePricePopupVisible() {
				this.showPrice = false
			},

			// 获取支付方式
			getQuery: function(disposablePayMode) {
				let payment = []
				let that = this
				https_1.queryList({
					disposablePayMode: disposablePayMode
				}).then((res) => {
					console.log(res, '支付方式获取')
					payment = res.data.sort(function(a, b) {
						return a.sortNum - b.sortNum;
					});
					payment.map(function(item) {
						item.payType = String(item.payType);

						// 调试测试使用-后续需要删除
						// if (item.accountName == '储值卡支付') {
						// 	item.payType = 6
						// }

						if (item.payType == 1) {
							item.value = that.memberInfo.accountBalance;
						} else if (item.payType == 2) {
							item.value = that.memberInfo.carAccountBalance;
						} else if (item.payType == 6) {
							// 储值卡
							item.value = that.cardBalance;
						}

						return item;
					});
					console.log('卡较好的看手机')
					// if (that.memberInfo.memberType == 1 || that.memberInfo.memberType === 2) {
					// 	that.radio='2'
					// } else if(that.memberInfo.memberType == 0&&disposablePayMode){
					// 	payment.forEach(function (item, index) {
					// 		if(item.accountName=='个人账户'){
					// 			that.radio='1'
					// 		}if(item.accountName=='充完即退'){
					// 			that.radio='-1'
					// 		}
					// 	})
					// }else{
					// 	that.radio='1'
					// }

					if ( ['szgx'].includes(app.globalData.sellerNo)) {
						that.paymentList = [
							// 暂时隐藏电量卡
							{
								accountName: "电量卡",
								payAccountId: 5,
								payType: "5",
								sortNum: 5,
								value: "0",
							},
							...payment
						]
					} else {
						that.paymentList = [
							...payment
						]
					}
					console.log(that.paymentList, 'paymentList...')
					let arr = []
					let radioShow = false
					let returnStatus = false
					this.paymentList.forEach(item => {
						if (item.payType != 2) {
							arr.push(item)
						}
						if (item.payType == 1) {
							radioShow = true
						} else if (item.payType == '-1') {
							returnStatus = true // 有配置-即充即退
						}
					})
					if (this.isAIKC() && returnStatus) {
						// AI 快充默认选择即充即退
						this.radio = -1
						this.payType = this.radio
					} else if (arr && arr.length && !radioShow) {
						this.radio = arr[0].payType
					}

					that.payment = payment
					// that.payType=payment[0].payType
					if (that.radio != '-1') {
						let index = payment.findIndex((item1) => {
							console.log(that.payType == item1.payType, that.payType, item1.payType)
							return that.payType == item1.payType
						})
						that.customPrice = that.payment[index] ? that.payment[index].value : ''
					}
					// 账号余额大于等于100元时默认选择100，小于100默认全部余额
					if (that.customPrice >= 100) {
						that.priceType = 2
						that.customPrice = 100
					} else {
						that.priceType = 3
					}
					console.log("对的", that.priceType, that.customPrice)

					// 充电卡 && 招小服 不显示底部提示
					if (this.radio == 5 && this.isTjhz()) {
						this.recharge = {
							text: '',
							value: false
						};
					}

					// #ifdef H5
					// H5隐藏支付分
					that.payment = that.payment.filter(item => {
						return item.payType != -2
					})

					if (that.isCYCAPPInH5()) {
						// 川逸充app内嵌h5-隐藏即充即退
						that.payment = that.payment.filter(item => {
							return item.payType != -1
						})
					}
					// #endif

					if (this.radio != 5) {
						this.minimumAmount();
					}
				})
			},

			//价格弹窗
			pricePopupVisible: function(e, _dataset) {
				/* ---处理dataset begin--- */
				this.datasetHandle(e, _dataset);
				/* ---处理dataset end--- */
				var that = this;
				var type = e.currentTarget.dataset.type;

				var gunid = this.gunid;

				if (type === 'open') {
					this.getStationGunPriceDetail(gunid);

					// https_1
					// 	.queryElectPriceDatil({
					// 		stationId: that.stationDetail.stationId,
					// 		gunId: gunid
					// 	})
					// 	.then(function (res) {
					// 		var pileList = []
					//
					// 		if(Number(that.radio)==2){
					// 			if(res.data.ContractPilelist.length){
					// 				pileList =  res.data.ContractPilelist;
					// 			}else{
					// 				pileList =  res.data.Pilelist;
					// 			}
					//
					// 		}else{
					// 			pileList =  res.data.Pilelist;
					// 		}
					//
					// 		if (pileList.length === 0) {
					// 			that.dataShow=false,
					// 				that.tips='暂无数据~'
					// 			return;
					// 		}
					//
					// 		var priceList = [];
					// 		pileList.forEach(function (pile) {
					// 			pile.chargingStage.forEach(function (item, index) {
					// 				if (index === pile.chargingStage.length - 1) {
					// 					item.timeStr = item.time + '-24:00';
					// 				} else {
					// 					item.timeStr = item.time + '-' + pile.chargingStage[index + 1].time;
					// 				}
					//
					// 				item.powerprice = item.powerprice.replace(/:/g, '：').replace(',', ' | ');
					// 				item.stageText = that.jfpg(item.stageEnum).text;
					// 				item.stageStyle = that.jfpg(item.stageEnum).style;
					// 				item.stageIcon = that.jfpg(item.stageEnum).icon;
					// 				item.totalPrice = that.calculation(item.powerprice);
					// 				priceList.push(item);
					// 			});
					// 		});
					// 		that.priceList=priceList,
					// 			that.showPrice=true
					// 	});
				} else if (type === 'disChargeOpen' && this.isV2GOption) {
					// #V2G功能
					this.getStationGunPriceDetail(gunid, true);
				} {
					this.showPrice = false
				}
			},

			// 尖峰平谷
			jfpg: function(jfpg) {
				var text = '';
				var style = '';
				var icon = '';
				switch (jfpg) {
					case 'Jian':
						text = '尖';
						style = 'jian';
						icon = 'https://oos-cn.ctyunapi.cn/front-end/static/homeSub/images/tip.png';
						break;

					case 'Feng':
						text = '峰';
						style = 'feng';
						icon = 'https://oos-cn.ctyunapi.cn/front-end/static/homeSub/images/peak.png';
						break;

					case 'Ping':
						text = '平';
						style = 'ping';
						icon = 'https://oos-cn.ctyunapi.cn/front-end/static/homeSub/images/flat.png';
						break;

					case 'Gu':
						text = '谷';
						style = 'gu';
						icon = 'https://oos-cn.ctyunapi.cn/front-end/static/homeSub/images/valley.png';
						break;

					default:
						break;
				}

				return {
					text: text,
					style: style,
					icon: icon
				};
			},

			// 计算总价
			calculation: function(str) {
				var numArr = str.match(/\d+\.?\d*/g) || [];
				var totalPrice = 0;
				numArr.forEach(function(item) {
					totalPrice += Number(item);
				});
				return totalPrice.toFixed(4);
			},

			//充值弹窗
			rechargeVisible: function(e) {
				// 新
				// #ifdef H5
				if (this.isCdgj()) {
					const href = window.location.hash
					const RECHARGE_REDIRECT_URL = href.replace('#', '')
					uni.setStorageSync('RECHARGE_REDIRECT_URL', RECHARGE_REDIRECT_URL)
					uni.navigateTo({
						url: '/mine/pages/recharge/recharge?h5Redirect=true'
					})
					return
				}
				// #endif

				// if(getApp().globalData.sellerNo == 'hyc' || this.isxmgjMix()){
				uni.navigateTo({
					url: '/mine/pages/recharge/recharge?goBack=true'
				})
				return
				// }
				// this.showRecharge =true

			},
			rechargeVisible1() {
				this.showRecharge = false
			},
			disposableVisible: function(e) {
				this.showDisposable = true

			},
			disposableVisible1() {
				this.showDisposable = false
			},

			//立即充值
			toCharge: function() {
				var that = this;
				uni.showLoading({
					title: '提交中...',
					mask: true
				});
				var chargePrice = 0;

				if (that.customRechargePrice !== '' && that.customRechargePrice > 0) {
					chargePrice = that.customRechargePrice * 100;
				} else if (that.rechargeIndex !== -1) {
					chargePrice = that.priceTypeList[that.rechargeIndex] * 100;
				} else {
					uni.showToast({
						title: '请选择充值金额',
						icon: 'none'
					});
					return false;
				}
				let type = 'JSAPI'
				//#ifdef APP-PLUS
				type = 'APP'
				//#endif
				https_1
					.unifiedOrder({
						openId: uni.getStorageSync('openid'),
						totalFee: chargePrice,
						tradeType: type // 交易类型：JSAPI -JSAPI支付 NATIVE -Native支付 APP -APP支付
					})
					.then(function(res) {
						if (res.code == 0) {
							//微信
							//#ifdef MP-WEIXIN
							var getpar = {
								timeStamp: res.data.timeStamp,
								nonceStr: res.data.nonceStr,
								package: res.data.package,
								paySign: res.data.sign,
								orderNo: res.data.orderNo
							};
							//#endif
							//APP
							//#ifdef APP-PLUS
							console.log("进入app充值", res.data)
							var getpar = {
								"appid": res.data.appid, // 微信开放平台 - 应用 - AppId，注意和微信小程序、公众号 AppId 可能不一致
								"noncestr": res.data.noncestr, // 随机字符串
								"package": res.data.package, // 固定值
								"partnerid": res.data.partnerid, // 微信支付商户号
								"prepayid": res.data.prepayid, // 统一下单订单号
								"timestamp": res.data.timestamp, // 时间戳（单位：秒）
								"sign": res.data.sign // 签名，这里用的 MD5/RSA 签名
							};
							//#endif
							that.orderNo = res.data.orderNo
							that.gopay(getpar);
						}

						uni.hideLoading();
					})['catch'](function(res) {
						uni.hideLoading();
						uni.showModal({
							title: '充值失败',
							content: res.msg || '服务异常',
							showCancel: false
						});
					});
			},

			//调起支付
			gopay: function(data) {
				var that = this;

				//#ifdef APP-PLUS
				//APP
				var _data = JSON.stringify(data)
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: _data, //微信、支付宝订单数据 【注意微信的订单信息，键值应该全部是小写，不能采用驼峰命名】
					success: function(res) {
						that.getUserMoney(data.orderNo);
						console.log('success:' + JSON.stringify(res));
					},
					fail: function(err) {
						uni.showModal({
							title: '消息提示',
							content: '充值失败',
							showCancel: false
						});
					}
				});
				//#endif

				//微信小程序
				//#ifdef MP-WEIXIN
				uni.requestPayment({
					timeStamp: data.timeStamp + '',
					nonceStr: data.nonceStr,
					package: data.package,
					signType: 'MD5',
					paySign: data.paySign,
					success: function() {
						that.getUserMoney(data.orderNo);
					},
					fail: function() {
						uni.showModal({
							title: '消息提示',
							content: '充值失败',
							showCancel: false
						});
					}
				});
				//#endif

				//#ifdef MP-ALIPAY

				//#endif
			},

			//查询充值结果
			getUserMoney: function(orderNo) {
				var that = this;
				uni.showLoading({
					title: '查询余额...',
					mask: true
				});
				https_1
					.orderQuery({
						orderNo: orderNo
					})
					.then(function() {
						uni.showModal({
							title: '消息提示',
							content: '充值成功',
							showCancel: false
						});
						that.getMemberInfo();
						uni.hideLoading();
					});
			},
			//查询用户身份
			getUserType: function() {
				https_1
					.getUserType().then((res) => {
						console.log(res)
						if (res.data && res.data.length > 1) {
							this.isChange = true
						} else {
							this.isChange = false
						}
					});
			},

			//选择支付方式
			onChange: function(event) {

				console.log(event, '当前选中的支付方式eeee')

				this.recharge = {
					text: '',
					value: false
				}
				var paytype = event.currentTarget.dataset.paytype
				this.payType = paytype
				this.radio = event.currentTarget.dataset.paytype
				this.customPrice = ''
				this.priceTypeCwjt = -1
				if (paytype == 1) {
					this.priceType = 0
				}
				//  只有微信支付分才调用这个接口 
				else if (paytype == -2) {
					this.currentTemplateId()
				} else {
					this.priceType = -1
				}
				let index = this.payment.findIndex((item) => {
					return event.currentTarget.dataset.paytype == item.payType
				})
				if (this.radio == 1) {
					this.setData({
						priceTypeCwjt: 2,
						priceType: 3,
						customPrice: this.payment[index].value,

					})

					if (this.radio != 5) {
						this.minimumAmount();
					}
				}

				// 储值卡重置
				if(paytype == 6) {
					this.customPrice=''
					this.priceType = 3
					this.customPrice = this.cardBalance
				}
				this.getPileDTOByNo()

			},

			//选择设置充电上限
			checkPriceType: function(e) {
				console.log('充完即退金额样式选中',e.currentTarget.dataset.index)
				//充完即退金额样式选中
				this.priceTypeCwjt = e.currentTarget.dataset.index

				this.priceType = e.currentTarget.dataset.index,
					this.customPrice = ''
				if (this.radio != 5) {
					if (e.currentTarget.dataset.index == 3) {
						let index = this.payment.findIndex((item) => {
							return this.payType == item.payType
						})
						this.setData({
							priceTypeCwjt: 2,
							priceType: 3,
							customPrice: this.payment[index].value
						})
					} else {
						this.setData({
							customPrice: this.priceTypeList[e.currentTarget.dataset.index]
						})
					}
					this.minimumAmount();
				} else {
					this.setData({
						customPrice: this.priceTypeListDlk[e.currentTarget.dataset.index]
					})
					console.log(this.customPrice, this.electricCardidObj.availableDegrees, '---选择度数---电量卡总度数---')
					// if(this.customPrice>this.electricitydata.totalDegrees){
					// 	this.recharge={
					// 		text: '预设充电上限不能大于电卡总额度',
					// 		value: true
					// 	}
					// }
					// 自定义度数不大于当前选择电卡度数
					this.validateChargeCardDegree()
					this.getchargeConver()
				}


			},
			// 预设充电上限不能大于电卡总额度校验提示
			validateChargeCardDegree() {
				if (!this.electricCardidObj.availableDegrees || this.customPrice > this.electricCardidObj
					.availableDegrees) {
					this.recharge = {
						text: '预设充电上限不能大于电卡总额度',
						value: true
					}
				} else {
					this.recharge = {
						text: '',
						value: false
					}
				}
			},

			//选择充值金额
			checkRechargePrice: function(e) {
				this.rechargeIndex = e.currentTarget.dataset.index,
					this.customRechargePrice = ''
			},

			//输入时触发（自定义设置充电上限）
			getCustomPrice: function(e) {
				this.priceType = -1,
					this.customPrice = e.detail.value
				if (this.radio != 5) {
					this.minimumAmount();
				} else {
					console.log(this.customPrice, 'ddd')
					if (this.customPrice <= 0) {
						this.recharge = {
							text: '预设充电量不能小于等于0',
							value: true
						}
						return
					}
					if (this.customPrice && !isNaN(this.customPrice)) {
						// this.customPrice>this.electricitydata.totalDegrees
						// 自定义度数不大于当前选择电卡度数   
						this.validateChargeCardDegree()
						this.getchargeConver()
					} else {
						this.estimate = 0
					}

				}
			},
			//输入时触发（自定义设置充电上限 充完即退
			getCustomPriceCwjt: function(e) {
				//设置-1就可以去掉选中的背景
				this.priceTypeCwjt = -1
				this.customPrice = e.detail.value
				this.minimumAmount();
			},

			//输入时触发（自定义充值金额）
			getCustomRechargePrice: function(e) {
				this.rechargeIndex = -1,
					this.customRechargePrice = e.detail.value
			},

			// 刷新
			refresh: function() {
				uni.showLoading({
					title: '刷新中...',
					mask: true
				});
				Promise.all([this.getPileDTOByNo(), this.getMemberInfo()]);
				uni.hideLoading();
			},

			// 开启V2G放电-#V2G功能
			openV2GDischarge() {
				debounce.use(() => {
					if (this.gunDetail.gunState == 1) {
						uni.showModal({
							content: '请您在插枪后，再点击开启V2G放电',
							showCancel: false
						})
						return
					} else if (!this.plateNo) {
						uni.showModal({
							content: '请先绑定您的车辆',
							showCancel: false
						})
						return
					} else if (!this.carIsDisCharge) {
						uni.showModal({
							content: '当前车辆暂未开启V2G放电功能, 可点击下方按钮去开启',
							confirmText: '去开启',
							success: (res) => {
								if (res.confirm) {
									uni.navigateTo({
										url: '/mine/pages/v2g/car'
									})
								}
							}
						})
						return
					}

					uni.navigateTo({
						url: `/homeSub/pages/startCharging/startCharging?pileNo=${this.pileNo}&gunNo=${this.gunno}&carNum=${this.plateNo}&isv2g=1`
					});
				}, 1000)();
			},

			// 启动充电防抖
			whetherChargeFd() {
				let that = this
				debounce.use(function() {
					// 如果勾选电池安全报告，必须绑定车辆
					console.log('是否勾选电池检测', that.batteryCheckVal);
					let hasCarInfo = that.memberInfo.vehicles && that.memberInfo.vehicles.length;
					if (that.batteryCheckVal.length && !hasCarInfo) {
						return uni.showModal({
							title: '温馨提示',
							content: '生成电池安全报告时，需完善充电车辆的相关信息！',
							confirmText: '绑定车辆',
							cancelText: '返回',
							success: function(r) {
								if (r.confirm) {
									that.goCarList();
								} else if (r.cancel) {
									return false;
								}
							}
						});
					}


					if (this.radio == 5) {
						this.whetherCharge1()
					} else {
						that.whetherCharge2()
					}

				}, 1000)();
			},
			whetherCharge1() {
				if (this.placeholdOrderCount) {
					uni.showModal({
						title: '温馨提示',
						content: `当前账号存在${this.placeholdOrderCount}笔未支付超时占位订单费用，请先完成支付再进行充电`,
						confirmText: '立即处理',
						cancelText: '暂不处理',
						confirmColor: this.objColor2.textColor,
						success: function(r) {
							if (r.confirm) {
								uni.navigateTo({
									url: '/orderSub/pages/placeholderOrderDetail/placeholderOrderDetail?id=' +
										this
										.placeholdOrderDetail.id + '&stationId=' + this.stationId
								})
							} else if (r.cancel) {
								this.whetherCharge()
							}
						}
					})

				}
			},
			// 判断是否满足充电要求 --- 道闸提醒等判断
			whetherCharge2() {
				let that = this
				console.log(this.isInsert, '54545')

				// 微信支付分支付，默认预充金额200
				if (that.radio == '-2') {
					this.customPrice = 200;
				}

				const pattern = /^\d+(\.\d{1,2})?$/;
				if (!pattern.test(this.customPrice)) {
					let content = '请检查预设充电量，最多小数点后两位'
					if (this.radio == 5) {
						content = '请检查预充金额，最多小数点后两位'
					}
					uni.showModal({
						title: '提示',
						content: '请检查预充金额，最多小数点后两位',
						showCancel: false,
					})
					return
				}

				if (this.placeholdOrderCount) {
					uni.showModal({
						title: '温馨提示',
						content: `当前账号存在${this.placeholdOrderCount}笔未支付超时占位订单费用，请先完成支付再进行充电`,
						confirmText: '立即处理',
						cancelText: '暂不处理',
						confirmColor: that.objColor2.textColor,
						success: function(r) {
							if (r.confirm) {
								uni.navigateTo({
									url: '/orderSub/pages/placeholderOrderDetail/placeholderOrderDetail?id=' +
										that
										.placeholdOrderDetail.id + '&stationId=' + this.stationId
								})
							} else if (r.cancel) {
								return false
							}
						}
					})
					return
				}




				if (that.isInsert && !that.recharge.value) {
					//是否开启道闸
					if (that.stationDetail.openBarrier === '1') {
						console.log(1, that.memberInfo)
						if (that.memberInfo.vehicles && that.memberInfo.vehicles.length > 0) {
							console.log(2)
							let url = '请核实确认当前充电车辆是否为：' + that.plateNo + '，车辆信息错误将导致无法享受停车费优惠活动。'
							// #ifdef MP-WEIXIN
							url = '请核实确认当前充电车辆是否为：' + that.plateNo + '，车辆信息错误将导致无法享受停车费优惠活动。'
							// #endif
							uni.showModal({
								title: '温馨提示',
								content: url,
								confirmText: '确认无误',
								cancelText: '选择车辆',
								confirmColor: that.objColor2.textColor,
								success: function(r) {
									if (r.confirm) {
										that.whetherCharge();
									} else if (r.cancel) {
										that.goCarList()
									}
								}
							})
						} else {
							let url = '您没有选择充电车辆，这样将无法享受停车费优惠活动。'
							// #ifdef MP-WEIXIN
							url = '您没有选择充电车辆，这样将\n无法享受停车费优惠活动。'
							// #endif
							uni.showModal({
								title: '温馨提示',
								content: url,
								confirmText: '绑定车辆',
								cancelText: '暂不绑定',
								confirmColor: that.objColor2.textColor,
								success: function(r) {
									if (r.confirm) {
										that.goCarList()
									} else if (r.cancel) {
										return false
									}
								}
							})

						}
					} else {
						// 交发e充电 提示文案处理
						const contentStr = that.isLgxny() ? '充电前请绑定车牌信息享受充电两小时停车费减免优惠！' : '请先绑定车辆信息再启动充电！'
						//是否开启强制绑定车辆
						if (that.stationDetail.isCarPlate) {
							if (!(that.memberInfo.vehicles && that.memberInfo.vehicles.length)) {
								uni.showModal({
									title: '温馨提示',
									content: contentStr,
									confirmText: '绑定车辆',
									cancelText: '暂不绑定',
									confirmColor: that.objColor2.textColor,
									success: function(r) {
										if (r.confirm) {
											that.goCarList()
										} else if (r.cancel) {
											return false
										}
									}
								})
							} else {
								that.whetherCharge();
							}
						} else {
							//是否开启提醒
							if (that.stationDetail.warnCarPlate) {
								if (!(that.memberInfo.vehicles && that.memberInfo.vehicles.length)) {
									uni.showModal({
										title: '温馨提示',
										content: contentStr,
										confirmText: '绑定车辆',
										cancelText: '暂不绑定',
										confirmColor: that.objColor2.textColor,
										success: function(r) {
											if (r.confirm) {
												that.goCarList()
											} else if (r.cancel) {
												that.whetherCharge();
											}
										}
									})
								} else {
									that.whetherCharge();
								}
							} else {
								that.whetherCharge();
							}
						}
					}
				}
			},

			//登录启动充电
			whetherCharge3() {
				getApp().globalData.CHECK_LOGIN_Model({}, '请先完成登录后再启动充电。')
			},

			// 判断是否满足充电要求
			whetherCharge() {
				let that = this

				https_1.querChargeRealy({
					pileNo: this.pileNo,
					gunNo: this.gunno,
					platformNo: this.platformNo || null,
				}).then(function(res) {

					if (res.code == 0) {
						if (res.data.flag) {
							//判断个人还是车队,如何是车队
							https_1.querMemberStatus().then(async (res) => {
								if (res.code == 0) {
									console.log(res, '00000000')
									if (res.data.ifCharging) {
										// 在充电
										uni.showModal({
											title: '消息提示',
											content: '您当前正在充电',
											confirmText: '充电详情',
											confirmColor: that.objColor2.textColor,
											success: function(r) {
												if (r.confirm) {
													// 查看充电详情
													uni.navigateTo({
														url: `/echartsPages/pages/power/power?busId=${res.data.billList[0].busId}&pileNo=${res.data.billList[0].pileNo}&gunNo=${res.data.billList[0].gunNo}`
													})
												}
											}
										})
									} else {
										that.requestSubscribeMessageDY(async () => {
											if (that.radio == '-1') {
												console.log('----11')
												await that.minimumAmount()
												if (!that.unifiedOrderStstus) {
													that.requestSubscribeMessage(() => {
														that.disposableStartCharge()
													})
												}
											} else if (that.radio == '-2') {
												console.log('----22')
												if (!that.unifiedOrderStstus) {
													that.requestSubscribeMessage(() => {
														that.disposableStartChargeZhifuFen()
													})
												}
											} else if (that.radio == '5') {
												console.log('55')
												if (!that.unifiedOrderStstus) {
													that.requestSubscribeMessage(() => {
														that.openChargedian()
													})
												}
											} else {
												await that.minimumAmount()
												console.log('----1222')
												that.requestSubscribeMessage(() => {
													that.openCharge()
												})

											}
										})
									}
								} else {
									uni.showModal({
										title: '提示',
										content: res.msg ? res.msg : `启动失败`,
										showCancel: false,
										confirmText: '关闭',
										confirmColor: that.objColor2.textColor,
									})
								}
							})
						} else {
							uni.showModal({
								title: '信息提示',
								content: res.data.msg ? res.data.msg : `启动失败`,
								showCancel: false,
							})
							that.refresh()
							// setTimeout(() => {
							// wx.navigateBack()
							// }, 2000)
						}
					} else {
						uni.showModal({
							title: '信息提示',
							content: res.msg ? res.msg : `鉴权失败`,
							showCancel: false,
						})
					}
				}).catch(err => {
					uni.showModal({
						title: '信息提示',
						content: '启动异常，请退出重试',
						showCancel: false,
						success: function(res) {
							if (res.confirm) {
								uni.navigateBack()
							}
						}
					});
				})
			},
			// 最低充值金额
			minimumAmount: function() {
				return new Promise((resolve, reject) => {

					let that = this
					https_1.getMinimumStartBalance().then(async (res) => {

						var payment = 0;
						that.payment.map(function(item) {
							if (item.payType == that.radio) {
								payment = item.value;
							}
						});
						console.log(that.memberInfo.memberType)
						console.log(Number(payment))
						console.log(that.customPrice)
						if (that.memberInfo.memberType) {
							console.log('车队')
						} else {
							console.log('个人')
						}
						if ((that.customPrice > Number(payment)) && !that.memberInfo.memberType) {
							that.recharge = {
								text: '预设充电上限不能大于账户余额',
								value: true
							}
						} else {
							if (Number((Number(res.data.configurationValue) / 100).toFixed(2)) <=
								Number(payment)) {
								that.recharge = {
									text: '',
									value: false
								}
							}
							if (Number((Number(res.data.configurationValue) / 100).toFixed(2)) <=
								that.customPrice && that
								.radio == '-1') {
								that.recharge = {
									text: '',
									value: false
								}
							}
							// else {
							// 	that.recharge={
							// 		text: '余额低于最低启动充电余额',
							// 		value: false
							// 	}
							// }
						}
						if (that.customPrice <= 0 && !that.memberInfo.memberType && that.radio ==
							'1') {
							console.log(that.radio, this.radio, that.customPrice <= 0, "余额不足", !
								that.memberInfo.memberType,
								that.radio == '1')
							that.recharge = {
								text: '余额不足',
								value: true
							}
						}
						if (that.customPrice <= 0 && !that.memberInfo.memberType && that.radio ==
							'-1') {
							console.log(that.customPrice <= 0, "充值金额不能低于最低启动充电余额", that
								.customPrice <= 0 && !that
								.memberInfo.memberType && that.radio == '-1')
							that.recharge = {
								text: '充值金额不能低于最低启动充电金额',
								value: true
							}
						}
						// if (
						// 	Number(payment) >= Number(that.customPrice != '' ? that.customPrice : that.priceTypeList[that.priceType] ? that.priceTypeList[that.priceType] : 0)
						// ) {
						// 	if (Number((Number(res.data.configurationValue) / 100).toFixed(2)) <= Number(payment)) {
						// 		that.recharge={
						// 			text: '',
						// 			value: false
						// 		}
						// 	} else {
						// 		that.recharge={
						// 			text: '余额低于最低启动充电余额',
						// 			value: true
						// 		}
						// 	}
						// } else {
						// 	that.recharge={
						// 		text: '充电上限不能大于账户余额',
						// 		value: true
						// 	}
						// }
						resolve('');

					})

				})

			},


			// 开启充电
			// openCharge: function () {
			// 	console.log(this.recharge.value)
			// 	if (!this.recharge.value) {
			// 		var str = {
			// 			pileNo: this.pileNo,
			// 			gunNo: this.gunno,
			// 			chargeMode: 0, // app充电模式(1自动模式,2金额模式,3时间模式,4电量模式)
			// 			valtageType: 0, //辅助电源参数
			// 			carNum: this.plateNo, //车牌号
			// 			payMode: Number(this.radio), //支付方式    
			// 			qrCode: this.qrCode,     
			// 			preChargeAmount: Number(this.customPrice != '' ? this.customPrice : this.priceTypeList[this.priceType] ? this.priceTypeList[this.priceType] : 0) //预冲金额
			// 		};
			// 		// console.log(this.payType)
			// 		// if(this.payType == 2){
			// 		// 	delete str.preChargeAmount
			// 		//   }else{
			// 		// 	str.preChargeAmount = str.preChargeAmount
			// 		//   }

			// 		if(this.memberInfo.memberType){
			// 			str.payMode = 2
			// 			delete str.preChargeAmount
			// 		}else{
			// 			str.payMode = 1
			// 			str.preChargeAmount = str.preChargeAmount
			// 		}
			// 		console.log(JSON.stringify(str),'999999999')
			// 		uni.navigateTo({
			// 			url: '../../../../homeSub/pages/startCharging/startCharging?parameter=' + JSON.stringify(str)
			// 		});
			// 	}
			// },
			openChargedian: function() {
				let params = {
					"activityId": "",
					"cardDegree": this.customPrice,
					"cardId": this.electricCardid,
					"plUserId": uni.getStorageSync('memberId')
				}

				console.log(this.recharge.value)
				if (!this.recharge.value) {
					var str = {
						pileNo: this.pileNo,
						gunNo: this.gunno,
						chargeMode: 0, // app充电模式(1自动模式,2金额模式,3时间模式,4电量模式)
						valtageType: 0, //辅助电源参数
						chargeCardId: this.electricCardid,
						carNum: this.plateNo, //车牌号
						payMode: Number(this.radio), //支付方式    
						qrCode: this.qrCode,
						preChargeAmount: this.estimate, //预冲金额
						preChargePower: this.customPrice,
						platformNo: this.platformNo || null,
					};
					// console.log(this.payType)
					// if(this.payType == 2){
					// 	delete str.preChargeAmount
					//   }else{
					// 	str.preChargeAmount = str.preChargeAmount
					//   }

					// #双枪
					if (this.doubleGunSwitch) {
						str.gunNo1 = this.gunDetail1.gunno
						str.isParallelCharge = this.gunDetail1.gunid ? 1 : 0
					}

					if (this.memberInfo.memberType) {
						str.payMode = 2

						// 车队充电不传自定义金额
						// 国网要传车队余额
						if (this.hasStateGrid == 1) {
							str.preChargeAmount = Number(this.memberInfo.carAccountBalance)
						} else {
							delete str.preChargeAmount
						}
					} else {
						str.payMode = 1
						str.preChargeAmount = str.preChargeAmount
					}
					getdegreeLockAmountQuery(params).then(res => {

					})
					console.log(JSON.stringify(str), '999999999')
					uni.navigateTo({
						url: '../../../../homeSub/pages/startCharging/startCharging?parameter=' +
							JSON.stringify(str) +
							'&stationId=' +
							this.stationId +
							this.getBatteryParams()
					});
				}
			},
			openCharge: function() {
				console.log(this.recharge.value)
				if (!this.recharge.value) {
					var str = {
						pileNo: this.pileNo,
						gunNo: this.gunno,
						chargeMode: 0, // app充电模式(1自动模式,2金额模式,3时间模式,4电量模式)
						valtageType: 0, //辅助电源参数
						carNum: this.plateNo, //车牌号
						payMode: Number(this.radio), //支付方式    
						qrCode: this.qrCode,
						preChargePower: this.customPrice,
						preChargeAmount: Number(this.customPrice != '' ? this.customPrice : this.priceTypeList[this
								.priceType] ?
							this.priceTypeList[this.priceType] : 0), //预冲金额
						platformNo: this.platformNo || null,
					};
					// console.log(this.payType)
					// if(this.payType == 2){
					// 	delete str.preChargeAmount
					//   }else{
					// 	str.preChargeAmount = str.preChargeAmount
					//   }

					// #双枪
					if (this.doubleGunSwitch) {
						str.gunNo1 = this.gunDetail1.gunno
						str.isParallelCharge = this.gunDetail1.gunid ? 1 : 0
					}

					if (this.memberInfo.memberType) {
						str.payMode = 2

						// 车队充电不传自定义金额
						// 国网要传车队余额
						if (this.hasStateGrid == 1) {
							str.preChargeAmount = Number(this.memberInfo.carAccountBalance)
						} else {
							delete str.preChargeAmount
						}
					} else {
						str.payMode = 1
						str.preChargeAmount = str.preChargeAmount
					}

					// 储值卡支付
					if(this.prepaidCardSwitch && Number(this.radio) === 6) {
						str.payMode = 6
						str.platformNo = this.platformNo 
						// str.hulianinterfaceId= this.hulianinterfaceId

						if(this.memberInfo.memberType) {
							// 车队储值卡
							const target = this.memberInfo.vehicles.length > 0 && this.memberInfo.vehicles.find((item) => item.plateNo === this.plateNo)
							str.vin = target?.vin
							str.storeCardNum = target?.storedCard
						} else {
							// 个人储值卡
							str.storeCardPhoneNo = this.memberInfo.telephone
						}
					}

					console.log(JSON.stringify(str), '999999999')
					uni.navigateTo({
						url: '../../../../homeSub/pages/startCharging/startCharging?parameter=' +
							JSON.stringify(str) +
							'&stationId=' +
							this.stationId +
							this.getBatteryParams()
					});
				}
			},
			// 唤醒模板消息
			requestSubscribeMessage(fn) {
				let that = this
				// #ifdef MP-WEIXIN
				if (!that.wxTemplateIds.length) {
					fn()
					return
				}
				wx.requestSubscribeMessage({
					tmplIds: that.wxTemplateIds || [],
					complete() {
						console.log('订阅消息回调')
						fn()
					}
				})
				// #endif

				// #ifndef MP-WEIXIN
				fn()
				// #endif

			},
			// 唤醒微信支付分
			openBusinessView(extraData) {
				let that = this

				// #ifdef APP-PLUS
				// APP 端，微信支付分支付
				KJOpenBusinessView.jx_requestWithData({
						'businessType' : 'wxpayScoreUse',
						'query' : extraData.query,
						'extInfo' : '{\"miniProgramType\":0}'
					},
					(res) => {
						console.log('支付结果',res,'支付结果')
						if(res.errCode == 0 && res.extMsg){
							res.extMsg = res.extMsg || {}
							that.queryWxOrder(res.extMsg.query_id)
						}else{
							that.isReorderPay = false
							getApp().hideLoading()
							uni.showModal({
								title: '温馨提示',
								content: res.errStr
							});
						}
					}
				);
				return
				// #endif

				if (wx.openBusinessView) {
					wx.openBusinessView({
						businessType: 'wxpayScoreUse',
						extraData,
						success(res) {
							console.log(res, '唤醒支付分成功')
							if (res.errCode == 0 && res.extraData) {
								console.log('支付分回调成功', res.extraData.query_id)
								let query_id = res.extraData.query_id
								that.queryWxOrder(query_id)
							} else {
								that.isReorderPay = false
							}
							//dosomething
						},
						fail(err) {
							console.log(err, '唤醒支付分失败')
							that.isReorderPay = false
							uni.showToast({
								title: '支付分唤醒失败',
								icon: 'none'
							})
							//dosomething
						},
						complete() {
							getApp().hideLoading()
							//dosomething
						}
					});
				} else {
					//引导用户升级微信版本
				}

			},
			queryWxOrder(query_id) {
				let that = this
				if (query_id) {
					queryWxOrder({
						queryId: query_id,
						sellerId: getApp().globalData.sellerId,
						appType: that.appType
					}).then(res => {
						getApp().hideLoading()
						console.log('检测支付分唤醒成功后订单状态', res)
						if (res.data == 'DOING') {
							console.log('这里应该启动充电啦啊啦啦')
							that.zhiFuFenChong()
						} else {
							const msgObj = {
								CREATED: '商户已创建服务订单',
								REVOKED: '商户取消服务订单',
								EXPIRED: '服务订单已失效'
							}
							console.log(msgObj[res.data])
							uni.showToast({
								title: '支付失败',
								icon: 'none'
							})
						}
						that.unifiedOrderStstus = false
						that.isReorderPay = false
					})
				} else {
					getApp().hideLoading()
					that.isReorderPay = false
					that.unifiedOrderStstus = false
					uni.showToast({
						title: '取消支付',
						icon: 'none'
					})
				}
			},

			zhiFuFenChong() {
				let that = this
				var str = {
					orderNumber: this.zhiFuFenBusId,
					pileNo: that.pileNo,
					gunNo: that.gunno,
					chargeMode: 0, // app充电模式(1自动模式,2金额模式,3时间模式,4电量模式)
					valtageType: 0, //辅助电源参数
					carNum: that.plateNo, //车牌号
					payMode: 3, //支付方式    
					qrCode: that.qrCode,
					preChargeAmount: Number(that.customPrice != '' ? that.customPrice : 0), //预冲金额
					isZhiFuFen: true, //支付分支付
					preChargePower: that.customPrice
				};

				// #双枪
				if (this.doubleGunSwitch) {
					str.gunNo1 = this.gunDetail1.gunno
					str.isParallelCharge = this.gunDetail1.gunid ? 1 : 0
				}

				console.log(JSON.stringify(str), '支付分支付启动充电')
				// getApp().globalData.referrerInfo = null
				uni.navigateTo({
					url: '../../../../homeSub/pages/startCharging/startCharging?parameter=' +
						JSON.stringify(str) +
						'&stationId=' +
						this.stationId
				});


			},
			//启动充电-支付分
			disposableStartChargeZhifuFen: function() {
				if (!this.customPrice) {
					return uni.showToast({
						title: '请输入预充金额',
						icon: "none",
						duration: 2000,
					})
				}
				console.log('执行支付分')
				var that = this
				if (!this.recharge.value) {
					that.unifiedOrderStstus = true
					let appType = that.appType
					var str = {
						appType,
						pileNo: this.pileNo,
						gunNo: this.gunno,
						chargeMode: 0, // app充电模式(1自动模式,2金额模式,3时间模式,4电量模式)
						valtageType: 0, //辅助电源参数
						carNum: this.plateNo, //车牌号
						payMode: 3, //支付方式    
						qrCode: this.qrCode,
						preChargeAmount: Number(this.customPrice != '' ? this.customPrice : 0) //预冲金额
					};
					// if(start){
					// 	str.busId = that.zhiFuFenBusId
					// }

					if (that.isReorderPay) return
					that.isReorderPay = true

					getApp().showLoading({
						title: '支付中'
					})
					https_1.disposableStartCharge(str)
						.then(function(res) {
							console.log(res, '获取到的支付分配置拉')
							if (res.code == 0) {
								getApp().hideLoading()
								that.zhiFuFenBusId = res.data.busId
								that.openBusinessView(res.data)
								// that.disposableUnifiedOrders()
							} else {
								getApp().hideLoading()
								uni.showModal({
									title: '信息提示',
									content: res.msg || '启动异常，请退出重试',
									showCancel: false,
								});
								that.unifiedOrderStstus = false
								that.isReorderPay = false
							}
						})
				}
			},
			//启动充电-充完即退-微信支付前校验
			disposableStartCharge: function() {
				var that = this
				if (!this.recharge.value) {
					that.unifiedOrderStstus = true
					var str = {
						pileNo: this.pileNo,
						gunNo: this.gunno,
						chargeMode: 0, // app充电模式(1自动模式,2金额模式,3时间模式,4电量模式)
						valtageType: 0, //辅助电源参数
						carNum: this.plateNo, //车牌号
						payMode: 1, //支付方式    
						qrCode: this.qrCode,
						preChargeAmount: Number(this.customPrice != '' ? this.customPrice : 0), //预冲金额

						isUseCcbPay: that.sellerPayConfigBySellerId.isUseCcbPay ? 1 : 0

					};
					https_1.disposableStartCharge(str)
						.then(function(res) {
							if (res.code == 0) {
								that.disposableUnifiedOrders()
							} else {
								uni.hideLoading();
								uni.showModal({
									title: '信息提示',
									content: '启动异常，请退出重试',
									showCancel: false,
									success: function(res) {
										if (res.confirm) {
											uni.navigateBack()
										}
									}
								});
							}
						})
				}
			},
			//启动充电-充完即退-微信预下单
			disposableUnifiedOrders: function() {
				var that = this;
				uni.showLoading({
					title: '提交中...',
					mask: true
				});
				let lockWxPay = null

				let tradeType = null

				let payChannel = null

				let cmPay = null

				let returnUrl = null

				let ccbPay = 0

				let openId = uni.getStorageSync('openId')

				// #ifdef MP-WEIXIN || MP-ALIPAY
				tradeType = 'JSAPI'
				// 判断中核是否开启建行支付
				if (that.sellerPayConfigBySellerId.isUseCcbPay) {
					ccbPay = 1
				}
				// #endif

				// #ifdef APP-PLUS
				tradeType = 'APP'
				lockWxPay = 1
				// #endif


				// #ifdef H5
				tradeType = 'JSAPI'
				// 桔禾付
				if (that.isnylH5()) {
					openId = uni.getStorageSync('nylOpenId')
					if (that.sellerPayConfigBySellerId.isUseJHPay) {
						tradeType = 'JH'
						payChannel = 'wx_lite'
					}
				} else if (that.isCdgj()) {
					// 成都公交
					if (uni.getStorageSync('clientType') == 'APP') {
						tradeType = 'MWEB' // 内嵌APP端
					}
				}

				// 招商局支付
				if (that.isZshAppInH5()) {
					if (that.sellerPayConfigBySellerId.isuseCMPay) {
						cmPay = 1
						let url = app.globalData.imgUrl
						returnUrl = `${url}/h5/${app.globalData.sellerNo}/#/homeSub/pages/terminal/gunDetail/payIng`
					}
				}
				lockWxPay = null
				// #endif

				let reqForm = {
					openId,
					gunId: that.gunDetail.gunid,
					totalFee: that.customPrice * 100,
					totalYuan: that.customPrice,
					tradeType, // 交易类型：JSAPI -JSAPI支付 NATIVE -Native支付 APP -APP支付
					lockWxPay,
					payChannel,
					cmPay,
					returnUrl,
					ccbPay,
				}
				// #ifdef MP-ALIPAY
				reqForm.payType = 2
				// #endif

				https_1
					.disposableUnifiedOrders(reqForm)
					.then(function(res) {
						if (res.code == 0) {
							that.orderNo = res.data.orderNo
							// #ifdef MP-ALIPAY
							that.outTradeNo = res.data.outTradeNo
							// #endif
							// 即充即退支付
							that.goDisposablePay(res);
							that.unifiedOrderStstus = false
						} else {
							that.unifiedOrderStstus = false
							uni.showModal({
								title: '消息提示',
								content: res.msg || '服务异常',
								showCancel: false
							});
						}
						uni.hideLoading();
					})['catch'](function(res) {
						that.unifiedOrderStstus = false
						uni.hideLoading();
						uni.showModal({
							title: '充值失败',
							content: res.msg || '服务异常',
							showCancel: false
						});
					});
			},
			//调起支付
			goDisposablePay: function(res) {
				var that = this;
				//#ifdef APP-PLUS
				var orderInfo = JSON.stringify({
					"appid": res.data.appid, // 微信开放平台 - 应用 - AppId，注意和微信小程序、公众号 AppId 可能不一致
					"noncestr": res.data.noncestr, // 随机字符串
					"package": res.data.package, // 固定值
					"partnerid": res.data.partnerid, // 微信支付商户号
					"prepayid": res.data.prepayid, // 统一下单订单号
					"timestamp": res.data.timestamp, // 时间戳（单位：秒）
					"sign": res.data.sign // 签名，这里用的 MD5/RSA 签名
				})
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo, //微信、支付宝订单数据 【注意微信的订单信息，键值应该全部是小写，不能采用驼峰命名】
					success: function(res) {
						console.log(res)
						that.unifiedOrderStstus = false
						that.getRechargeResult();
					},
					fail: function(err) {
						console.log(err)
						that.unifiedOrderStstus = false
						that.cancelCharge()
					}
				});
				//#endif

				// #ifdef MP-WEIXIN
				// 判断中核是否开启建行支付
				if (that.sellerPayConfigBySellerId.isUseCcbPay) {
					that.getRechargeResult();
					console.log(res.data.cshdk_Url, '复制的内容')
					uni.setClipboardData({
						data: res.data.cshdk_Url
					})
				} else {
					uni.requestPayment({
						provider: 'wxpay',
						timeStamp: res.data.timeStamp,
						nonceStr: res.data.nonceStr,
						package: res.data.package,
						signType: res.data.signType,
						paySign: res.data.sign,
						success: function(res) {
							console.log(res)
							that.unifiedOrderStstus = false
							that.getRechargeResult();
						},
						fail: function(err) {
							console.log(err)
							that.unifiedOrderStstus = false
							that.cancelCharge()
						}
					});
				}
				// #endif

				// #ifdef MP-ALIPAY
				my.tradePay({
					// 调用统一收单交易创建接口（alipay.trade.create），获得返回字段支付宝交易号 trade_no
					tradeNO: that.orderNo,
					success: res => {
						console.log('调用 my.tradePay 成功: ', JSON.stringify(res));
						that.unifiedOrderStstus = false
						if (res.resultCode != 9000) {
							that.cancelCharge();
						} else {
							that.getRechargeResult();
						}
					},
					fail: error => {
						that.unifiedOrderStstus = false
						that.cancelCharge();
						console.error('调用 my.tradePay 失败: ', JSON.stringify(error));

					},
				});
				// #endif


				// #ifdef H5
				if (that.isnylH5()) {

					if (!that.sellerPayConfigBySellerId.isUseJHPay) {
						// 未开启桔禾付执行
						uni.showModal({
							title: '消息提示',
							content: '未开启桔禾付，请选择其他支付方式',
							showCancel: false,
						});
						return
					}
					let orderNo = that.orderNo

					console.log(res.data, '支付入参')
					var getpar = {
						timeStamp: res.data.timeStamp + '',
						nonceStr: res.data.nonceStr,
						package: res.data.package || res.data.packageStr,
						paySign: res.data.sign || res.data.paySign,
						signType: res.data.signType || 'MD5',
						// price:chargePrice,
					};
					let payInfo = encodeURIComponent(JSON.stringify(getpar))

					let url = app.globalData.imgUrl
					// url = 'http://172.16.88.57:8081'

					let backUrl = encodeURIComponent(
						`${url}/h5/${app.globalData.sellerNo}/#/homeSub/pages/terminal/gunDetail/payIng?orderNo=${orderNo}`
					)

					console.log(payInfo)
					console.log(backUrl)

					uni.setStorageSync('payIngData', {
						pileNo: that.pileNo,
						gunNo: that.gunno,
						chargeMode: 0, // app充电模式(1自动模式,2金额模式,3时间模式,4电量模式)
						valtageType: 0, //辅助电源参数
						carNum: that.plateNo, //车牌号
						payMode: 1, //支付方式    
						qrCode: that.qrCode,
						preChargeAmount: Number(this.customPrice != '' ? this.customPrice : 0), //预冲金额
						orderNumber: that.orderNo,
						disposablePayMode: true
					})
					// return
					wx.miniProgram.redirectTo({
						url: `/pages/wechatPay/wechatPay?payInfo=${payInfo}&backUrl=${backUrl}`
					})
				} else if (that.isZshAppInH5()) {
					if (!that.sellerPayConfigBySellerId.isuseCMPay) {
						// 未开启招商局支付
						uni.showModal({
							title: '消息提示',
							content: '未开启CMPay付，请选择其他支付方式',
							showCancel: false,
						});
						return
					}

					// 招商h5 支付
					let {
						CMPay_url,
						orderNo
					} = res.data
					that.isPayIng = false
					console.log('这是要跳转的地址', CMPay_url)

					// return

					uni.setStorageSync('payIngData', {
						pileNo: that.pileNo,
						gunNo: that.gunno,
						chargeMode: 0, // app充电模式(1自动模式,2金额模式,3时间模式,4电量模式)
						valtageType: 0, //辅助电源参数
						carNum: that.plateNo, //车牌号
						payMode: 1, //支付方式    
						qrCode: that.qrCode,
						preChargeAmount: Number(this.customPrice != '' ? this.customPrice : 0), //预冲金额
						orderNumber: orderNo,
						disposablePayMode: true
					})

					// let form = document.createElement('form');
					//   document.body.appendChild(form);
					//   form.method = "post";
					//   form.action = CMPay_url;
					//   form.submit();
					//   document.body.removeChild(form)
					window.location.href = CMPay_url
				} else if (that.isCdgj()) {
					// 成都公交
					const urlParams = util.getUrlDataToObj(window.location.href)
					const params = {
						...urlParams,
						orderNo: that.orderNo,
						customPrice: that.customPrice,
						isH5PayCallback: 1,
					}
					let callbackUrl = encodeURIComponent(`${app.globalData.imgUrl}/h5/${app.globalData.sellerNo}/#/homeSub/pages/terminal/gunDetail/gunDetail${util.setOptionsToUrlQuery(params)}`);
					const clientType = uni.getStorageSync('clientType')

					if (clientType == 'WeChat') {
						// H5 内嵌小程序端 
						toCDGJWechatMiniPay(res.data, callbackUrl)
					} else {
						// H5 内嵌APP端 
						toCDGJH5UrlPay(res.data, callbackUrl)
					}
					
				} else {
					uni.showModal({
						title: '消息提示',
						content: '请选择其他支付方式',
						showCancel: false,
					});
				}
				// #endif
			},
			//取消充值 -- 支付前
			cancelCharge: function() {
				https_1
					.disposableUnifiedOrders({
						openId: uni.getStorageSync('openid'),
						totalFee: this.customPrice * 100,
						tradeType: 'APP',
						orderNo: this.orderNo,
						cancelRecharge: 2
					})
					.then((res) => {
						if (res.code == 0) {
							uni.showModal({
								title: '消息提示',
								content: '已取消充值',
								showCancel: false
							});
						}
					});
			},
			//启动充电-充完即退-微信取消充值 -- 支付后
			disposableCancelRecharge: function() {
				uni.showModal({
					title: '消息提示',
					content: '网络异常，如果产生多次扣费，请联系客服人员退款',
					showCancel: false
				});
				var that = this;
				let reqForm = {
					orderNo: this.orderNo,
				}
				// #ifdef MP-ALIPAY
				reqForm.outTradeNo = that.outTradeNo
				// #endif
				https_1
					.disposableCancelRecharge(reqForm)
					.then(function() {
						that.showPrice = true
						that.rechargeLoading = false
						that.rechargeError = true
						that.getRechargeResultNum = 1
					});
			},
			//查询充值结果
			getRechargeResult: function() {
				var that = this;
				this.rechargeLoading = true
				uni.showLoading({
					title: '充值中..',
					mask: true
				})

				// 旧轮询查询-每3秒1次，网络过慢会有问题
				// let count = 10
				// let msec = 3000
				// // 建行设置轮询时间
				// if (that.sellerPayConfigBySellerId.isUseCcbPay) {
				// 	count = 10000
				// 	msec = 30000
				// }
				// this.disposableOrderResultQuery();
				// this.Interval = setInterval(function() {
				// 	if (that.getRechargeResultNum > count) {
				// 		uni.hideLoading()
				// 		clearInterval(that.Interval);
				// 		that.disposableCancelRecharge();
				// 	} else {
				// 		that.disposableOrderResultQuery();
				// 	}
				// }, msec);

				// 同步查询充值到账结果，3秒1次，超次数后就调用取消充值接口
				this.rollPolingPayStatus()
			},

			// 轮询支付结果-同步
			rollPolingPayStatus() {
				let count = 60
				let msec = 3000
				// 建行设置轮询时间
				if (this.sellerPayConfigBySellerId.isUseCcbPay) {
					count = 10000
					msec = 30000
				}

				setTimeout(() => {
					// 3分钟都没查询成功，就调取消充值接口
					console.log('---setTimeout--', this.getRechargeResultNum);
					if (this.getRechargeResultNum > count) {
						console.log('---取消充值---');
						uni.hideLoading()
						this.disposableCancelRecharge();
					} else {
						console.log('---查询充值结果---');
						this.disposableOrderResultQuery();
					}
				}, msec)
			},

			//启动充电-充完即退-微信查询支付结果
			disposableOrderResultQuery: function() {
				var that = this;
				var num = this.getRechargeResultNum + 1;
				this.getRechargeResultNum = num
				let reqForm = {
					orderNo: this.orderNo
				}
				// #ifdef MP-ALIPAY
				reqForm.payType = 2
				reqForm.outTradeNo = that.outTradeNo
				// #endif
				https_1
					.disposableOrderResultQuery(reqForm)
					.then(function(res) {
						if (res.code === 0) {
							that.enterDisposableStartCharge()
						} else {
							that.rollPolingPayStatus()
						}
					}).catch (err => {
						that.rollPolingPayStatus()
					})
			},
			//启动充电-充完即退-微信支付成功后鉴权
			enterDisposableStartCharge: function() {
				var that = this
				let customPrice = that.customPrice

				that.customPrice = ''
				console.log('--------enterDisposableStartCharge-start------');
				uni.hideLoading()
				that.rechargeLoading = false
				that.getRechargeResultNum = 1
				console.log('--------enterDisposableStartCharge-end------', this.recharge);
				if (!this.recharge.value || this.isH5PayCallback) {
					console.log('--------enterDisposableStartCharge-11111------');
					var str = {
						pileNo: this.pileNo,
						gunNo: this.gunno,
						chargeMode: 0, // app充电模式(1自动模式,2金额模式,3时间模式,4电量模式)
						valtageType: 0, //辅助电源参数
						carNum: this.plateNo, //车牌号
						payMode: 1, //支付方式
						qrCode: this.qrCode,
						preChargeAmount: Number(customPrice != '' ? customPrice : 0), //预冲金额
						orderNumber: this.orderNo,
						outTradeNo: this.outTradeNo,
						disposablePayMode: true,
						preChargePower: customPrice,
						isUseCcbPay: that.sellerPayConfigBySellerId.isUseCcbPay ? 1 : 0
					};

					// #双枪
					if (this.doubleGunSwitch) {
						str.gunNo1 = this.gunDetail1.gunno
						str.isParallelCharge = this.gunDetail1.gunid ? 1 : 0
					}

					console.log(JSON.stringify(str), '8888888')
					uni.navigateTo({
						url: '../../../../homeSub/pages/startCharging/startCharging?parameter=' + JSON
							.stringify(str) +
							'&stationId=' + this.stationId
					});
					// https_1.disposableStartCharge(str)
					// .then(function (res) {
					// 	if (res.code == 0) {
					// 		uni.navigateTo({
					// 			url: '../../../../homeSub/pages/startCharging/startCharging?parameter=' + JSON.stringify(str)
					// 		});
					// 	}else{

					// 	}
					// })
				}
			},

			// 关闭充值异常
			closeRechargeError: function() {
				this.rechargeError = false
			},
			// 客服
			calltel: function() {
				if (this.phoneNumber) {
					uni.makePhoneCall({
						phoneNumber: this.phoneNumber
					});
				} else {
					this.closeRechargeError();
				}
			},
			// 获取模板消息id
			currentTemplateId() {
				currentTemplateId(getApp().globalData.sellerId).then(res => {
					if (res.data) {
						this.wxTemplateIds = [res.data]
						console.log(res, '获取id')
					}
				})
			},
			// 获取模板消息id
			subscribeTemplateId(fn) {
				// getWechatMiniProgramTemplateId({
				// 	sellerId: getApp().globalData.sellerId,
				// 	titleName: '结束充电提醒'
				// }).then(res => {
				// 	if(res.data){
				// 		this.wxTemplateIds1 = [res.data]
				// 		console.log(res, '获取id')
				// 	}
				// 	fn()
				// }).catch(err=>{
				// 	fn()
				// })
			},
			// 显示支付分弹窗
			showzhifufenTips() {
				uni.showModal({
					title: '信息提示',
					content: '微信信用分达到550分以上，可以先充电后付款。微信信用分由微信官方授权评分。',
					showCancel: false,
				})
			},
			requestSubscribeMessageDY(fn) {
				let that = this
				uni.showLoading({
					title: '加载中...',
					mask: true
				});
				// #ifdef MP-WEIXIN
				getWechatMiniProgramTemplateId({
					sellerId: getApp().globalData.sellerId,
					titleName: '结束充电提醒'
				}).then(res => {
					uni.hideLoading()
					if (res.data) {
						this.wxTemplateIds1 = [res.data]
						wx.requestSubscribeMessage({
							tmplIds: that.wxTemplateIds1 || [],
							complete() {
								console.log('订阅消息回调2121212')
								fn()
							}
						})
					} else {
						fn()
					}
				}).catch(err => {
					uni.hideLoading()
					fn()
				})
				// #endif

				// #ifndef MP-WEIXIN
				fn()
				// #endif

			},

			// 双枪
			addGun(){
				if(this.gunDTOList.length){
					this.showSelectGun = true
				}else{
					uni.showToast({
						title:'暂无可选择的枪',
						icon:'none'
					})
				}
			},

			selectGun(gunDetail){
				this.gunDetail1 = gunDetail
				setTimeout(()=>{
					this.showSelectGun = false
					// 双枪充电处理
					this.isInsert = (gunDetail.gunState==2 && this.gunDetail.gunState==2)
				},500)
			},

		},
	};
</script>
<style lang="less" scoped>
	@import '../../../../commin/flex.less';
	@import '../../../../commin/commin.less';

	@import './gunDetail.less';
	@import './gunDetail-discount.less';

	/* homeSub/pages/terminal/gunDetail/gunDetail.wxss */
	/*颜色*/
	/*数字*/
	/*文字溢出隐藏*/
	/*固定布局*/
	/* grid是（布局 */
	/*宽高*/
	/* 字体大小*/
	/* 行高 */
	/* 圆角 */
	/* 外边距 */
	/* 内边距 */
	/* 实边框 */
	/* 虚边框 */
	/* 定位  */
	/* 数组  */
	.record-in .aaa1 {
		color: #909399;
	}

	.record-in .aaa2 {
		color: var(--textColor);
	}

	.record-in .aaa3 {
		color: #f7a14a;
	}

	.record-in .aaa4 {
		color: #72c23d;
	}

	.record-in .aaa5 {
		color: #606266;
	}

	page {
		background-color: #f5f7fa;
		padding-bottom: 150rpx;
	}

	.pile_head {
		margin: 16rpx 24rpx 16rpx 24rpx;
		align-items: center;
		padding: 40rpx 32rpx 40rpx 32rpx;
		display: flex;
		background: linear-gradient(0deg, #ffffff, #f4f6f8);
		border: 2rpx solid #ffffff;
		box-shadow: 4rpx 7rpx 20rpx 0rpx rgba(166, 171, 179, 0.24);
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		justify-content: space-between;
		.add-gun {
			color: var(--textColor);
			text-align: center;
			width:100%;
			font-weight: bold;
		}
	}

	.pile_head .pile_img {
		width: 140rpx;
		height: 120rpx;
	}

	.pile_head .plie_box {
		width: 408rpx;

	}

	.pile_head .plie_box .plie_name {
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #1a1a1a;
	}

	.pile_head .plie_box .plie_detail {
		overflow: hidden;
		-webkit-line-clamp: 1;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		margin-top: 28rpx;
		font-size: 26rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #606266;
	}

	.pile_head .img {
		width: 16rpx;
		height: 27rpx;
	}

	.plie_list {
		width: 638rpx;
		background: linear-gradient(0deg, #fff, #f4f6f8);
		border: 2rpx solid #fff;
		box-shadow: 4rpx 7rpx 20rpx 0rpx rgba(166, 171, 179, 0.24);
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		margin: 16rpx 24rpx 0rpx 24rpx;
		padding: 40rpx 32rpx 37rpx 32rpx;
	}

	.plie_list .plie_item {
		display: flex;
		align-items: center;
	}

	.plie_list .plie_item .img {
		width: 111rpx;
		height: 111rpx;
		background: #fff;
		border: 7rpx solid var(--textColor);
		opacity: 0.06;
		border-radius: 50%;
	}

	.plie_list .plie_item .img2,
	.img6 {
		width: 100rpx;
		height: 100rpx;
		background: rgba(20, 135, 250, 0.06);
		border-radius: 50%;
		position: absolute;
		margin-left: 13rpx;
		line-height: 100rpx;
		text-align: center;
		font-size: 24rpx;
		font-family: PingFangSC;
		font-weight: 400;
		color: var(--textColor);
	}

	.img6 {
		background: rgba(121, 132, 197, 0.16);
		color: rgba(121, 132, 197);
		box-sizing: border-box;
		padding-top: 20rpx;
		line-height: 30rpx;
	}

	.plie_list .plie_item .status {
		width: 111rpx;
		height: 111rpx;
		background: #fff;
		border: 7rpx solid #909399;
		opacity: 0.06;
		border-radius: 50%;
	}

	.plie_list .plie_item .status3 {
		width: 100rpx;
		height: 100rpx;
		background: rgba(144, 147, 153, 0.06);
		border-radius: 50%;
		position: absolute;
		margin-left: 13rpx;
		line-height: 100rpx;
		text-align: center;
		font-size: 24rpx;
		font-family: PingFangSC;
		font-weight: 400;
		color: #909399;
	}

	.plie_list .plie_item .item {
		// margin: 0 0 0 32rpx;
	}

	.plie_list .plie_item .item_name {
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #1a1a1a;
		display: flex;
		align-items: center;
	}

	.plie_list .plie_item .item_name .item_img {
		width: 44rpx;
		height: 34rpx;
		margin-left: 33rpx;
	}

	.plie_list .plie_item .item_info {
		margin: 30rpx 0 30rpx 0;
		font-size: 26rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #606266;
	}

	.plie_list .plie_item .item_info .price {
		font-size: 40rpx;
		color: var(--textColor);
	}

	.price .sp {
		font-size: 24rpx;
		font-family: PingFang-SC-Medium;
		font-weight: 500;
	}

	.plie_list .plie_item .nextInfo {
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #909399;
	}

	.plie_list .priceDetail {
		position: absolute;
		right: 57rpx;
		align-items: center;
		display: flex;
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: var(--textColor);
	}

	.priceList {
		padding: 0rpx 34rpx 0rpx 34rpx;
		height: 700rpx;
		overflow: auto;
	}

	.priceList .priceItem {
		padding-bottom: 40rpx;
		border-bottom: 1rpx solid #dcdfe6;
		margin-top: 40rpx;
	}

	.priceList .priceItem .priceTop {
		display: flex;
		justify-content: space-between;
	}

	.priceList .priceItem .priceTop .first {
		display: flex;
		align-items: center;
	}

	.priceList .priceItem .priceTop .first .txt {
		font-size: 30rpx;
		margin: 0 32rpx 0 15rpx;
		font-family: PingFangSC;
		font-weight: 400;
		color: #1a1a1a;
	}

	.priceList .priceItem .priceTop .first .price_img {
		width: 39rpx;
		height: 31rpx;
	}

	.priceList .priceItem .priceTop .first .price_current {
		width: 56rpx;
		height: 32rpx;
	}

	.priceList .priceItem .priceTop .txt1 {
		color: #fc724c;
		font-size: 32rpx;
		font-family: DIN;
		font-weight: bold;
	}

	.priceList .priceItem .priceTop .txt2 {
		font-size: 22rpx;
		font-family: PingFangSC;
		font-weight: 500;
	}

	.priceList .priceItem .priceTop .txt3 {
		font-size: 30rpx;
		font-family: PingFang-SC-Medium;
		font-weight: Medium;
	}

	.priceList .priceItem .servePrice {
		font-size: 26rpx;
		padding-top: 31rpx;
		font-family: PingFangSC;
		font-weight: 400;
		color: #606266;
	}

	.carInfo {
		width: 638rpx;
		height: 108rpx;
		line-height: 108rpx;
		background: linear-gradient(0deg, #ffffff, #f4f6f8);
		border: 2rpx solid #ffffff;
		box-shadow: 4rpx 7rpx 20rpx 0rpx rgba(166, 171, 179, 0.24);
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		margin: 16rpx 24rpx 0rpx 24rpx;
		padding: 0 32rpx 0 32rpx;
		display: flex;
		justify-content: space-between;
	}

	.carInfo .tip {
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #1a1a1a;
	}

	.carInfo .plateNo {
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #909399;
	}

	.stopExplain {
		width: 638rpx;
		background: linear-gradient(0deg, #fff, #f4f6f8);
		border: 2rpx solid #fff;
		box-shadow: 4rpx 7rpx 20rpx 0rpx rgba(166, 171, 179, 0.24);
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		margin: 16rpx 24rpx 0rpx 24rpx;
		padding: 40rpx 32rpx 37rpx 32rpx;
		line-height: 48rpx;
	}

	.stopExplain .explain {
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #1a1a1a;
	}

	.stopExplain .tip {
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #909399;
	}

	.stopExplain .tip .txt {
		font-size: 22rpx;
	}

	.stopExplain .explainCost {
		display: flex;
		justify-content: space-between;
	}

	.stopExplain .explainCost .time {
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #909399;
	}

	.stopExplain .explainCost .price {
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #606266;
	}

	.payType {
		width: 638rpx;
		background: linear-gradient(0deg, #fff, #f4f6f8);
		line-height: 60rpx;
		border: 2rpx solid #fff;
		box-shadow: 4rpx 7rpx 20rpx 0rpx rgba(166, 171, 179, 0.24);
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		margin: 16rpx 24rpx 0rpx 24rpx;
		padding: 40rpx 32rpx 37rpx 32rpx;
	}

	.payType .title {
		display: flex;
		justify-content: space-between;
	}

	.payType .title .txt1 {
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #1a1a1a;
	}

	.payType .txt2 {
		display: flex;
		align-items: center;
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: var(--textColor);
	}

	.payType .txt3 {
		display: flex;
		align-items: center;
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 500;
	}

	.payType .radio {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.payType .radio .account {
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #909399;
		display: flex;
		align-items: center;
	}

	.payType .radio .account .money {
		color: #fc724c;
	}

	.payType .radio image {
		width: 30rpx;
		height: 30rpx;
		margin-right: 17rpx;
	}

	.payType .radio .turn_img,
	.turn_img {
		width: 16rpx;
		height: 27rpx;
		margin-left: 17rpx;
	}

	.payType .radio .turn_img1 {
		width: 34rpx;
		height: 34rpx;
		margin-left: 17rpx;
	}

	.setting {
		width: 638rpx;
		background: linear-gradient(0deg, #fff, #f4f6f8);
		line-height: 60rpx;
		border: 2rpx solid #fff;
		box-shadow: 4rpx 7rpx 20rpx 0rpx rgba(166, 171, 179, 0.24);
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		margin: 16rpx 24rpx 16rpx 24rpx;
		padding: 40rpx 32rpx 37rpx 32rpx;
	}

	.setting .setting_title {
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #1a1a1a;
		display: flex;
		justify-content: space-between;
		align-items: center;

	}

	.setting .priceType {
		display: flex;
		flex-wrap: wrap;
	}

	.setting .priceType .type {
		// width: 170rpx;
		height: 64rpx;
		padding: 0rpx 25rpx;
		line-height: 64rpx;
		background: #f5f7fa;
		border-radius: 32rpx 32rpx 32rpx 32rpx;
		text-align: center;
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #606266;
		margin: 36rpx 24rpx 0 0;
	}

	.setting .priceType .type_action {
		background: var(--btnColor);

		border-radius: 32rpx 32rpx 32rpx 32rpx;
		font-size: 30rpx;
		font-family: PingFang SC;
		color: #fff;
	}

	.setting .priceType .custom {
		display: flex;
		align-items: center;
		margin-top: 36rpx;
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #606266;
	}

	.setting .priceType .custom .custom_img {
		margin-left: 23rpx;
		width: 26rpx;
		height: 27rpx;
	}

	.setting .priceType .custom .custom_input {
		width: 80wh;
		text-align: center;
		font-size: 28rpx;
		color: #606266;
		//border-bottom: 1rpx solid #606266;
	}

	.setting .setting_tip {
		font-size: 22rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #f7a14a;
	}

	.fot_operation {
		position: fixed;
		bottom: 0;
		z-index: 2;
		display: flex;
		justify-content: space-between;
		width: 100%;
		// height: 88rpx;
		padding: 10rpx 32rpx 10rpx 102rpx;
		background: linear-gradient(0deg, #ffffff, #f4f6f8);
		border: 2rpx solid rgba(255, 255, 255, 0.55);
		box-shadow: 0rpx -25rpx 67rpx 0rpx rgba(177, 182, 190, 0.2);
		box-sizing: border-box;

		.btn-flex {
			// display: flex;
			// align-items: center;
			flex: 1,
		}
	}

	.fot_operation .reFresh {
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #606266;
		text-align: center;
		/* #ifndef MP-ALIPAY */
		margin: 10rpx 101rpx 0 0;
		/* #endif */
		/* #ifdef MP-ALIPAY */
		margin: 10rpx 80rpx 0 0;
		/* #endif */
	}

	.fot_operation .reFresh .fot_img {
		width: 34rpx;
		height: 33rpx;
	}

	.fot_operation .fot_btn {
		// width: 468rpx; 
		flex: 1;
		height: 88rpx;
		border-radius: 44rpx 44rpx 44rpx 44rpx;
		text-align: center;
		line-height: 88rpx;
		font-size: 34rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #fff;
	}

	// #V2G功能
	.fot_operation_v2g .fot_btn {
		width: 100%;
		height: 88rpx;
		border-radius: 44rpx;
		line-height: 1;
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: 400;
		padding: 30rpx 52rpx;
		color: #fff;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.fot_operation .fot_btn1 {
		background: var(--btnColor);
	}

	.fot_operation .fot_btn2 {
		background: #c0c4cc;
	}

	.rechargeTitle {
		font-size: 34rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #1a1a1a;
	}

	.priceType1 {
		display: flex;
		flex-wrap: wrap;
	}

	.priceType1 .type1 {
		width: 180rpx;
		height: 64rpx;
		line-height: 64rpx;
		background: #f5f7fa;
		border-radius: 32rpx 32rpx 32rpx 32rpx;
		text-align: center;
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #606266;
		margin: 36rpx 42rpx 0 0;
	}

	.priceType1 .type_action1 {
		background: rgba(20, 135, 250, 0.06);
		border: 1rpx solid var(--textColor);
		border-radius: 32rpx 32rpx 32rpx 32rpx;
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: var(--textColor);
	}

	.priceType1 .custom1 {
		display: flex;
		align-items: center;
		margin-top: 36rpx;
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #606266;
	}

	.priceType1 .custom1 .custom_img1 {
		margin-left: 23rpx;
		width: 26rpx;
		height: 27rpx;
	}

	.priceType1 .custom1 .custom_input1 {
		width: 150rpx;
		text-align: center;
		font-size: 28rpx;
		color: #606266;
		border-bottom: 1rpx solid #606266;
	}

	.rechargeBtn {
		width: 400rpx;
		height: 88rpx;
		line-height: 88rpx;
		background: var(--btnColor);
		border-radius: 44rpx 44rpx 44rpx 44rpx;
		text-align: center;
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #fff;
		margin: 83rpx 0 0 115rpx;
	}

	.price_popup {
		width: 702rpx !important;
		height: 691rpx;
		margin: 0 24rpx 26rpx 24rpx;
		background: linear-gradient(0deg, #ffffff, #f4f6f8);
		border: 2rpx solid #ffffff;
		box-shadow: 4rpx 7rpx 20rpx 0rpx rgba(166, 171, 179, 0.24);
		border-radius: 16rpx;
	}

	.rechargeRemind {
		position: absolute;
		// top: -90rpx;
		top: -75rpx;
		right: 70rpx;
		background: linear-gradient(105deg, #F7B068, #F7A14A);
		box-shadow: 4rpx 7rpx 20rpx 0rpx rgba(166, 171, 179, 0.24);
		border-radius: 16rpx;
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #FEFEFE;
		padding: 20rpx;
	}

	.filtrate {
		background: #fff;
		padding: 41rpx 32rpx;
		border-radius: 16rpx;
		margin: auto 24rpx;
	}

	.switch-nav {
		display: flex;
		justify-content: space-between;
		padding: 24rpx 32rpx;

		.t1 {
			width: 164rpx;
			font-size: 26rpx;
			font-weight: 400;
			color: #606266;
		}

		.thidden {
			display: -webkit-box;
			/*弹性伸缩盒子模型显示*/
			-webkit-box-orient: vertical;
			/*排列方式*/
			-webkit-line-clamp: 1;
			/*显示文本行数(这里控制多少行隐藏)*/
			overflow: hidden;
			/*溢出隐藏*/
			font-size: 26rpx;
			font-weight: 400;
			color: #303133;
			width: 85%;
		}

		.t2 {
			width: 130rpx;
			display: flex;
			align-items: center;
			color: #606266;
			font-size: 26rpx;

			image {
				width: 26rpx;
				height: 26rpx;
				margin-right: 15rpx;
			}
		}
	}

	.box-info {
		width: 680rpx;
		height: 660rpx;
		padding: 40rpx 32rpx;
		margin: 0 auto;
		overflow: auto;
		padding-top: 0;

		.title {
			font-size: 30rpx;
			font-weight: bold;
			color: #303133;
			position: fixed;
			z-index: 10;
			background-color: #fff;
			width: 93%;
			height: 100rpx;
			line-height: 100rpx;

			&:after {
				content: '';
				display: block;
				position: absolute;
				top: 36rpx;
				left: -15rpx;
				width: 6rpx;
				height: 30rpx;
				background-color: #6DB12E;
				z-index: 2;
			}
		}

		&>.t1 {
			display: flex;
			justify-content: space-between;
			font-size: 26rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #303133;
			margin-bottom: 24rpx;
			margin-top: 32rpx;
			padding-top: 80rpx;
		}

		.list {
			.item {
				width: 620rpx;
				padding: 40rpx 32rpx;
				position: relative;
				display: flex;
				justify-content: space-between;
				background: #F5F7FA;
				margin-bottom: 16rpx;
				align-items: center;

				&:last-of-type {
					margin-bottom: 0;
				}

				.time {
					font-size: 26rpx;
					font-family: PingFang SC;
					font-weight: 500;
					color: #303133;
				}

				&>.t1 {
					width: 80rpx;
					height: 38rpx;
					display: none;
					background: #FC724C;
					border-radius: 17rpx 17rpx 0px 17rpx;
					color: #F5F7FA;
					text-align: center;
					line-height: 38rpx;
					font-size: 20rpx;
					position: absolute;
					top: 40rpx;
					left: 220rpx;
					z-index: 1;
				}

				&>.t2 {
					width: 110rpx;
					height: 40rpx;
					line-height: 40rpx;
					text-align: center;
					display: none;
					background: #FC724C;
					border-radius: 0px 20rpx 20rpx 0px;
					color: #fff;
					font-size: 26rpx;
					position: absolute;
					top: 0;
					left: 0;
					z-index: 1;
				}

				.t2.active,
				.t1.active {
					display: block;
				}

				.right-item {

					.type1,
					.type2 {
						font-size: 26rpx;
						font-weight: 500;
						color: #606266;

						.l1 {
							display: flex;
							justify-content: space-between;
							align-items: center;

							text {
								margin-left: 20rpx;
							}
						}

						.t2 {
							font-size: 32rpx;
							font-weight: bold;
							color: var(--textColor);
						}

						.delete {
							font-size: 26rpx;
							font-weight: 400;
							text-decoration: line-through;
							color: #909399;
							margin-top: 30rpx;

							text {
								margin-left: 20rpx;
							}
						}

						&>text {
							margin-left: 20rpx;
						}
					}

					.type2 {
						.t1 {
							font-size: 32rpx;
							font-weight: bold;
							color: var(--textColor);
						}
					}
				}

			}

			.item.active {
				background: rgba(252, 114, 76, 0.08);
			}
		}
	}

	.u-progress-content {

		.soc,
		.status5 {
			font-size: 20rpx;
			text-align: center;
			color: var(--textColor);
		}
	}

	.PrechargeInput {
		border-bottom: 1rpx solid #C0C4CC;
		margin-top: 18rpx;

		.custom_input {
			width: 500rpx;
			font-size: 28rpx;
			color: #606266;
			display: inline-block;
			vertical-align: middle;
			margin-left: 30rpx;
			//border-bottom: 1rpx solid #606266;
		}
	}


	.plie_item2 {
		display: flex;
		align-items: center;
	}

	.plie_item2 .img {
		width: 111rpx;
		height: 111rpx;
		background: #fff;
		border: 7rpx solid var(--textColor);
		opacity: 0.06;
		border-radius: 50%;
	}

	.plie_item2 .img2,
	.img6 {
		width: 100rpx;
		height: 100rpx;
		background: rgba(20, 135, 250, 0.06);
		border-radius: 50%;
		position: absolute;
		margin-left: 13rpx;
		line-height: 100rpx;
		text-align: center;
		font-size: 24rpx;
		font-family: PingFangSC;
		font-weight: 400;
		color: var(--textColor);
	}

	.img6 {
		background: rgba(121, 132, 197, 0.16);
		color: rgba(121, 132, 197);
		box-sizing: border-box;
		padding-top: 20rpx;
		line-height: 30rpx;
	}

	.plie_item2 .status {
		width: 111rpx;
		height: 111rpx;
		background: #fff;
		border: 7rpx solid #909399;
		opacity: 0.06;
		border-radius: 50%;
	}

	.plie_item2 .status3 {
		width: 100rpx;
		height: 100rpx;
		background: rgba(144, 147, 153, 0.06);
		border-radius: 50%;
		position: absolute;
		margin-left: 13rpx;
		line-height: 100rpx;
		text-align: center;
		font-size: 24rpx;
		font-family: PingFangSC;
		font-weight: 400;
		color: #909399;
	}

	.plie_item2 .item {
		margin: 0 0 0 32rpx;
	}

	.plie_item2 .item_name {
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #1a1a1a;
		display: flex;
		align-items: center;
	}

	.plie_item2 .item_name .item_img {
		width: 44rpx;
		height: 34rpx;
		margin-left: 33rpx;
	}

	.plie_item2 .item_info {
		margin: 30rpx 0 30rpx 0;
		font-size: 26rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #606266;
	}

	.plie_item2 .item_info .price {
		color: #fc724c;
	}

	.plie_item2 .nextInfo {
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #909399;
	}

	.plieInfo {
		color: #909399;
		font-weight: 400;
		font-size: 26rpx;
		margin-top: 24rpx;

		.interval {
			margin: 0 10rpx
		}
	}

	.tagDivision {
		margin: 0rpx 15rpx;
		display: inline;
		position: relative;

		&::after {
			position: absolute;
			right: 0;
			top: 8rpx;
			content: '';
			height: 22rpx;
			width: 1px;
			background: #909399;
		}
	}

	.active-icon {
		width: 24rpx;
		height: 28rpx;
		margin-right: 12rpx;
	}

	.recharge-loading {
		position: fixed;
		left: 0;
		right: 0;
		top: 0;
		bottom: 0;
		z-index: 999;
		background: rgba(0, 0, 0, 0.6);
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.recharge-loading .body {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		width: 630rpx;
		height: 522rpx;
		background: #ffffff;
		border-radius: 20rpx;
	}

	.recharge-loading .body .icon {
		width: 230rpx;
		height: 222rpx;
	}

	.recharge-loading .body .title {
		font-size: 32rpx;
		font-weight: bold;
		color: #18181a;
		margin-top: 24rpx;
	}

	.recharge-loading .body .desc {
		font-size: 26rpx;
		font-weight: 500;
		color: #fc724c;
		margin-top: 32rpx;
	}

	.recharge-error {
		position: fixed;
		left: 0;
		right: 0;
		top: 0;
		bottom: 0;
		z-index: 999;
		background: rgba(0, 0, 0, 0.6);
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.recharge-error .body {
		width: 630rpx;
		background: #ffffff;
		border-radius: 20rpx;
		overflow: hidden;
	}

	.recharge-error .body .title {
		font-size: 34rpx;
		font-weight: bold;
		color: #fc724c;
		text-align: center;
		margin-top: 42rpx;
		margin-bottom: 16rpx;
		position: relative;
	}

	.recharge-error .body .title .close {
		position: absolute;
		top: -12px;
		right: 20rpx;
		width: 28rpx;
		height: 28rpx;
		padding: 14rpx;
	}

	.recharge-error .body .content {
		padding: 34rpx;
	}

	.recharge-error .body .content .msg {
		font-size: 30rpx;
		font-weight: 500;
		color: #303133;
		line-height: 44rpx;
	}

	.recharge-error .body .content .phone {
		font-size: 30rpx;
		font-weight: 500;
		color: #303133;
		line-height: 48rpx;
		margin: 50rpx 0 40rpx;
	}

	.recharge-error .body .btn {
		height: 110rpx;
		line-height: 110rpx;
		background: #ffffff;
		font-size: 30rpx;
		font-weight: bold;
		color: var(--textColor);
		border-top: 1px solid #dcdfe6;
		border-radius: 0;
	}

	.recharge-error .body .btn::after {
		border: 0;
	}




	//移动端优化  启动充电
	.fot_operation2 {
		position: fixed;
		bottom: 0;
		z-index: 2;
		display: flex;
		justify-content: center;
		width: 100%;
		height: 88rpx;
		background: linear-gradient(0deg, #ffffff, #f4f6f8);
		border: 2rpx solid rgba(255, 255, 255, 0.55);
		box-shadow: 0rpx -25rpx 67rpx 0rpx rgba(177, 182, 190, 0.2);

		.fot_btn {
			width: 90%;
			height: 88rpx;
			border-radius: 44rpx 44rpx 44rpx 44rpx;
			text-align: center;
			line-height: 88rpx;
			font-size: 34rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #fff;
			background: var(--btnColor);
		}
	}



	/*站点优惠价格样式*/
	.yhimg_box {
		width: 40rpx;
		height: 40rpx;
		// margin-right: 8rpx;
		position: relative;

		.discount_img {
			width: 40rpx;
			height: 40rpx;
			position: absolute;
		}

		.vip_text {
			position: absolute;
			top: 40%;
			left: 55%;
			transform: translate(-50%, -50%);
			font-size: 16rpx;
			font-family: DIN-BlackItalic;
			font-weight: 600;
			// font-style:italic;
			color: #A65424;
		}
	}

	// #V2G功能
	.discharge-btn {
		flex-shrink: 0;
		height: 88rpx;
		border: 1rpx solid #FC724C;
		padding: 30rpx 21rpx;
		font-weight: 400;
		font-size: 28rpx;
		color: #FC724C;
		line-height: 1;
		box-sizing: border-box;
		border-radius: 50px;
		display: flex;
		align-items: center;
		justify-content: center;
		margin-right: 24rpx;
	}

	.discharge-btn-dis {
		background: #c0c4cc;
		border: none;
		color: #fff;
	}

	.selectGun_box{
		max-height: 800rpx;
	}
	.selectGun_title{
		font-size:30rpx;
		font-weight:bold;
		text-align: center;
		padding:20rpx 0;
	}
</style>